Device and method for material characterisation

ABSTRACT

The invention provides a device ( 100 ) for screening one or more items ( 101,1806 ) of freight or baggage for one or more types of target material, the device comprising: a source ( 200, 201,1800 ) of incident radiation ( 204,206,1804 ) configured to irradiate the one or more items ( 101,1806 ); a plurality of detectors ( 202,209,1807, 301 ) adapted to detect packets of radiation ( 205,207,1700 ) emanating from within or passing through the one or more items ( 101, 1806 ) as a result of the irradiation by the incident radiation ( 204, 206, 1804 ), each detector being configured to produce an electrical pulse ( 312 ) caused by the detected packets having a characteristic size or shape dependent on an energy of the packets; one or more digital processors ( 203, 210, 303, 304, 306, 305 ) configured to process each electrical pulse to determine the characteristic size or shape and to thereby generate a detector energy spectrum for each detector of the energies of the packets detected, and characterise a material associated with the one or more items based on the energy spectrum.

BACKGROUND

This invention relates to a device for material identification of theinvention, with particular application to inspection of freight orbaggage for one or more types of material.

X-ray systems used in freight and baggage screening use a broad spectrumX-ray generator to illuminate the item to be screened. A detector arrayon the opposite side of the item is used to measure the intensity ofX-ray flux passing through the item. Larger systems may have the optionto have two or more X-ray sources so as to collect two or moreprojections through the cargo at the same time. X-Ray screening systemsuse the differential absorption of the low energy and high energy X-raysto generate a very coarse classification of the screened material, andthen use this coarse classification to generate a “false color” imagefor display. A small number of colors—as few as 3 in most existingsystems—are used to represent material classification.

Traditional detectors are arranged in a 1×N array comprising, mosttypically, phosphorus or Si—PIN diodes, to enable an image of N rows andM columns, captured row by row as the item passes through the scanningsystem. An image resolution of 1-2 mm can be achieved with around 2,000detectors in the array. However, these systems simply produce an imagebased on the integrated density (along the line of sight between X-raysource and detector) of the contents of the item being screened. Twodifferent detector arrays are used to generate a single image, one togenerate the high energy image and the other to generate the low energyimage. This gives an improved estimate of integrated density and arudimentary ability to identify items as either organic or metal. In ascreening application, where the objective is to identify ‘contraband’or other items of interest, the range of material which incorrectlyfalls into the ‘contraband’ classification is large. As such, a skilledoperator may be required to identify potential threat material from thelarge number of false alarms.

There is a need for improved freight and baggage screening systems.

SUMMARY OF THE INVENTION

In accordance with a first broad aspect of the invention there isprovided a device for screening one or more items of freight or baggagecomprising:

a source of incident radiation configured to irradiate the one or moreitems;

a plurality of detectors adapted to detect packets of radiationemanating from within or passing through the one or more items as aresult of the irradiation by the incident radiation, each detector beingconfigured to produce an electrical pulse caused by the detected packetshaving a characteristic size or shape dependent on an energy of thepackets;

one or more digital processors configured to process each electricalpulse to determine the characteristic size or shape and to therebygenerate a detector energy spectrum for each detector of the energies ofthe packets detected, and to characterise a material associated with theone or more items based on the detector energy spectra.

In one embodiment, each packet of radiation is a photon and theplurality of detectors comprise one or more detectors each composed of ascintillation material adapted to produce electromagnetic radiation byscintillation from the photons and an pulse producing element adapted toproduce the electrical pulse from the electromagnetic radiation. Thepulse producing element may comprise a photon-sensitive material and theplurality of detectors may be arranged side-by-side in one or moredetector arrays of individual scintillator elements of the scintillationmaterial each covered with reflective material around sides thereof anddisposed above and optically coupled to a photon-sensitive material. Thescintillation material may be lutetium-yttrium oxyorthosilicate (LYSO).The photon-sensitive material may be a silicon photomultiplier (SiPM).The individual scintillator elements of one or more of the detectorarrays may present a cross-sectional area to the incident radiation ofgreater than 1.0 square millimetre. The cross-sectional area may begreater than 2 square millimetres and less than 5 square millimetres.

In one embodiment, the one or more digital processors are furtherconfigured with a pileup recovery algorithm adapted to determine theenergy associated with two or more overlapping pulses.

In one embodiment, wherein the one or more digital processors isconfigured to compute an effective atomic number Z for each of at leastsome of the detectors based at least in part on the correspondingdetector energy spectrum. The one or more digital processors may beconfigured to compute the effective atomic number Z for each of at leastsome of the detectors by: determining a predicted energy spectrum for amaterial with effective atomic number Z having regard to an estimatedmaterial thickness deduced from the detector energy spectrum andreference mass attenuation data for effective atomic number Z; andcomparing the predicted energy spectrum with the detector energyspectrum. The one or more digital processors may be configured tocompute the effective atomic number Z for each of at least some of thedetectors by: determining a predicted energy spectrum for a materialwith effective atomic number Z having regard to a calibration tableformed by measuring one or more materials of known composition; andcomparing the predicted energy spectrum with the detector energyspectrum.

In one embodiment, the one or more digital processors is configured toperform the step of comparing by computing a cost function dependent ona difference between the detector energy spectrum and the predictedenergy spectrum for a material with effective atomic number Z.

In one embodiment, a gain calibration is performed on each detectorindividually to provide consistency of energy determination among thedetectors and the one or more digital processors is further configuredto calculate the detector energy spectrum for each detector taking intoaccount the gain calibration.

In one embodiment, a count rate dependent calibration is performedcomprising adaptation of the detector energy spectra for a count ratedependent shift.

In one embodiment, a system parameter dependent calibration is performedon the detector energy spectra comprising adaptation for time,temperature or other system parameters.

In one embodiment, the one or more digital processors is furtherconfigured to reduce a communication bandwidth or memory use associatedwith processing or storage of the detector energy spectra, by performinga fast Fourier transform of the energy spectra and removing bins of thefast Fourier transform having little or no signal to produce reducedtransformed detector energy spectra. The one or more digital processorsmay be further configured to apply an inverse fast Fourier transform onthe reduced transformed detector energy spectra to provide reconstructeddetector energy spectra. The one or more digital processors may befurther configured with a specific fast Fourier transform windowoptimised to minimise ringing effects of the fast Fourier transform.

In one embodiment, the one or more digital processors is furtherconfigured with a baseline offset removal algorithm to remove a baselineof a digital signal of electrical pulse prior to further processing.

In one embodiment, the one or more digital processors is furtherconfigured to produce an image of the one or more items composed ofpixels representing the characterisation of different pans of the one ormore items deduced from the detector energy spectra.

In one embodiment, the one or more digital processors is furtherconfigured to perform one or more of tiling, clustering, edge detectionor moving average based on the effective atomic numbers determined forsaid plurality of detectors.

In one embodiment, the one or more digital processors is furtherconfigured to perform threat detection based on one or more types oftarget material.

According to a second broad aspect of the invention there is provided amethod of screening one or more items of freight or baggage, the methodcomprising the steps of:

irradiating the one or more items using a source of incident radiation;

detecting packets of radiation emanating from within or passing throughthe one or more items as a result of the irradiation by the incidentradiation, using a plurality of detectors, each detector beingconfigured to produce an electrical pulse caused by the detected packetshaving a characteristic size or shape dependent on an energy of thepackets;

processing each electrical pulse using one or more digital processors todetermine the characteristic size or shape;

generating a detector energy spectrum for each detector of the energiesof the packets detected, and

characterising a material associated with the one or more items based onthe detector energy spectra.

Throughout this specification including the claims, unless the contextrequires otherwise, the word ‘comprise’, and variations such as‘comprises’ and ‘comprising’, will be understood to imply the inclusionof a stated integer or step or group of integers or steps but not theexclusion of any other integer or step or group of integers or steps.

Throughout this specification including the claims, unless the contextrequires otherwise, the words “freight or baggage” encompass parcels,letters, postage, personal effects, cargo, boxes containing consumer orother goods and all other goods transported which are desirable ornecessary to scan for certain types of materials, including but notlimited to contraband, and dangerous or explosive materials which may beplaced by accident or placed deliberately due to criminal, terrorist ormilitary activity.

Throughout this specification including the claims, unless the contextappears otherwise, the term “packets” in relation to incident radiationincludes individual massless quantum particles such as X-ray, gamma-rayor other photons; neutrons or other massive particles; and also extendsin its broadest aspects to any other corpuscular radiation for which anenergy of each corpuscle may be defined and detected.

Throughout this specification including the claims, unless the contextrequires otherwise, the words “energy spectrum” in relation to aparticular detector refers to a generation of energy values of theindividual packets of radiation emanating from or passing through thepart of the items under investigation as detected over a time intervalfrom the particular detector, which energy values can comprise valuesover a range, typically continuous, and may be represented as ahistogram of detection counts versus a plurality of defined energy bins,the number of bins representing the desired or achievable energyresolution and constituting at least 10 bins but preferably more than50, 100 or 200 energy bins.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 and 10 show a high level overview of an X-Ray system of the formthat may be used for freight and baggage screening according to twopreferred embodiments.

FIG. 2 illustrates an example diagram of the interior of the X-raychamber according to an embodiment.

FIG. 3 shows a more detailed view of the detection system and processingelectronics according to an embodiment.

FIG. 4 illustrates a flowchart for a method of effective Z processing ofthe full energy spectra computed by the pulse processing electronicsaccording to an embodiment.

FIG. 5 is a graph illustrating the removal of pileup of two pulses froma spectrum according to an embodiment.

FIG. 6 is a graph illustrating the removal of pileup of two and threepulses from a spectrum according to another embodiment.

FIG. 7 is a graph illustrating the partial removal of pileup of two andthree pulses from a spectrum when assuming only 2 pulse pileup accordingto an embodiment.

FIG. 8 is a graph illustrating the shape of the spectral smoothingfilter when using a rectangular window or a raised cosine pulse windowaccording to an embodiment.

FIG. 9 illustrates how data is arranged and built up into an image of ascanned sample, prior to further post processing and image displayaccording to an embodiment.

FIG. 10 illustrates a wireless variant of the system of FIG. 1.

FIG. 11 is a graph illustrating the un-calibrated received spectra froma plurality of detectors according to an embodiment.

FIG. 12 is a graph illustrating a set of detector gains calculated basedon a calibration procedure according to an embodiment.

FIG. 13 is a graph illustrating the received spectra from a plurality ofdetectors after setting the digital gain of the detectors based on thedetector gains illustrated in FIG. 12.

FIG. 14 illustrates results of the effective Z interpolation process fora 10% transmission case according to an embodiment.

FIG. 15 illustrates effective Z plotted against intensity (percenttransmission) for a range of material samples tested according to anembodiment.

FIG. 16A, 16B, 16C illustrate a detector subsystem comprising an arrayof detectors according to embodiments in which a linear array ofscintillation crystals is coupled to an array of pulse producingelements in the form of silicon photomultipliers.

FIGS. 16D and 16E illustrate a detector subsystem comprising singlescintillation crystals individually coupled to an array of pulseproducing elements in the form of silicon photomultipliers by means ofan optical coupling layer interposed between the scintillation crystalsand silicon photomultipliers according to an embodiment.

FIG. 17 illustrates a detector subsystem converting photons into voltagepulses for pulse processing according to an embodiment.

FIG. 18 illustrates a screening system using Gamma-rays for materialidentification according to an embodiment.

FIG. 19 illustrates an example of the formation of clusters, wheresingle tiles are ignored according to an embodiment.

FIG. 20 illustrates an example of effective Z processing steps accordingto an embodiment

FIG. 21 illustrates a table relating to an edge mask L(c) indexed oncolumns according to an embodiment.

FIG. 22 illustrates the behaviour of the moving average as ittransitions over an edge according to an embodiment.

DETAILED DESCRIPTION OF EMBODIMENTS

It is convenient to describe the invention herein in relation toparticularly preferred embodiments. However, the invention is applicableto a wide range of methods and systems and it is to be appreciated thatother constructions and arrangements are also considered as fallingwithin the scope of the invention. Various modifications, alterations,variations and or additions to the construction and arrangementsdescribed herein are also considered as falling within the ambit andscope of the present invention.

This invention relates to a method and apparatus for materialidentification using a range of radiation types for analysis. Inparticular, the apparatuses and methods exemplified herein may beapplied to X-ray screening, however, it will be appreciated that theapparatuses and methods could readily be modified for other types ofincident radiation such as neutrons or gamma rays, or other types ofemanating radiation, particularly by substituting a different form ofdetector unit, to detect for example electromagnetic, neutron,gamma-ray, light, acoustic, or otherwise. Such modifications are withinthe broadest aspect of the invention.

In addition to X-rays being attenuated when transmitted through matter,X-rays passing through matter interact with that matter via a number ofmodalities including: scattering off crystal planes, causingfluorescence X-ray emission from within the electron structure of theelements; and, scattering off nano-scale structures within the materialbeing scanned. These forms of interaction slightly modify the energyspectrum of the transmitted X-ray beam and by detecting and analyzingthis change in energy spectrum it is possible to deduce elementalspecific information about the item through which the X-ray beam passed.

The system of one of the embodiments described below provides for adetection system capable of estimating the energy of the individualX-ray photons received at the detector. This is achieved using a singledetector array per X-ray source, with each of the detectors in the arrayconstructed from an appropriate detector material coupled to aphotomultiplier, producing an analog signal comprising a series ofpulses—one pulse for each detected X-ray, which may or may not beoverlapping when received at the detector. The detector array may bearranged analogously to the freight or baggage screening systems of theprior art in order to build up an image row by row of characteristics ofthe item. Unlike the systems of the prior art, the detector array iscapable of measuring the energy of each detected photon.

A pulse processing system is then used to generate a histogram for eachsingle detector. This histogram comprises of a count of the number ofX-rays falling into each histogram bin in a given time interval. Thehistogram bins represent a range of energy of the received X-rays, andthe histogram is therefore the energy spectrum of the received X-raybeam. There may be a large number of histogram bins—for example up to512 separate energy bands or more—representing an enormous enhancementover the coarse dual energy band measurement within existing scanningsystems.

The system of the described embodiments uses this full high resolutionenergy spectrum to obtain a much more accurate estimate of the screenedmaterial's effective atomic number (effective Z), resulting in a vastlysuperior classification of the screened material.

High Level Overview

FIG. 1 shows a high level overview of an X-Ray freight and baggagescreening system according to an embodiment of the invention.

The main features of the system are as follows:

-   -   1. An X-ray chamber (100) in which the sample (101) is scanned.        The chamber is designed to contain the X-ray source(s) and        associated detector hardware and to ensure X-rays are not        emitted beyond the chamber so as to ensure the safety of        operators.    -   2. A means for causing relative motion between the sample to be        screened (101) and X-ray chamber (100). In one embodiment, this        will comprise a means to transport (102) the sample to be        screened (101) into the X-ray chamber. In a typical system this        may be a conveyor belt, roller system or similar, but the system        described in this disclosure will function equally well with any        transport means. One preferred embodiment is for the sample to        pass through a tunnel in which the X-ray source(s) and detector        array(s) are located in fixed positions. However, in an        alternative embodiment, the X-ray source(s) and detector        array(s) may move past the sample.    -   3. Within the X-ray chamber (100), there are:        -   a. One or more X-ray sources (200, 201)        -   b. One or more arrays (202, 209) of X-ray detectors, with at            least one detector array for each X-ray source.        -   c. The X-ray detector arrays (202, 209) may be further            divided into smaller detector arrays if desirable for            implementation. The system described in this disclosure does            not depend on a specific arrangement and/or subdivision of            the detector array.        -   d. Digital processors (203, 210) for processing the received            X-ray pulses from the detector array (202, 209). Depending            on the implementation architecture, the digital processors            may:            -   i. Reside on the same boards as the detector subsystem.            -   ii. Reside on separate hardware, housed within or                outside the X-ray scanner housing            -   iii. Form part of the Host system, or            -   iv. A combination of the above.

Typically, there are suitable means, such as a host computer (103) or asshown in FIG. 10 a wireless control and display system (104), forcontrol and configuration of the X-ray screening system, and display andpost processing of data collected from the X-ray scanning system.

In some system configurations where automated threat detection isperformed, there may not be a requirement for the control/displaysubsystem, but instead some means of reporting detected threats.

FIG. 2 illustrates an example diagram of the interior of the X-raychamber, showing:

-   -   1. X-ray sources (200) and (201) from which X-rays (204) and        (206) are incident on the sample under test (208).    -   2. Detector array (202) and (209) for the detection of X-rays        (205) and (207) incident on the detector array.    -   3. The signals from each detector array are connected to the        digital processors (203) and (210). The digital processors may        be mounted either internally or external to the X-ray chamber,        and could in part be combined with the host system.    -   4. The output (211) of the digital processors is passed to the        host for display, while the host sends/receives control signals        (212) to/from the digital processors.

The positioning of the components in FIG. 2 is illustrative only, anddoes not indicate a specific requirement for number of sources ordetectors, and nor does it specify a requirement for placement ofsources or detectors. The detection and processing system described inthis disclosure will operate successfully with any number of sources anddetector arrays, and regardless of how those sources are placed. The keypoint is that X-rays from Source 1 pass through the test sample and arereceived at Detector Array 1, and X-rays from Sources 2 to N passthrough the sample and are received at Detector Array 2 to N (i.e. thesystem can operate with any number of sources and any number of detectorarrays, which may or may not be equal to the number of sources.)

FIG. 3 shows a more detailed view of the detection system andprocessing. This figure shows the steps for a single detector. Theeffective Z may utilize, and image post processing will require, accessto the spectra from all detectors.

For each detector in each detector array, there is a detection systemand processing electronics comprising:

-   -   1. A detector subsystem (301) for each individual detector        element (with N such subsystems for a 1×N detector array), the        detector subsystem comprising:        -   a. Detector material for detecting the incident X-rays (300)            and converting each detected X-Ray to a light pulse        -   b. A photomultiplier for receiving and amplifying the            incident light pulses into an analog signal comprising            pulses (312) that may or may not overlap        -   c. Appropriate analog electronics, which may include            filtering        -   d. An optional variable gain amplifier (302). Fixed analog            gain may also be used, or it may not be desirable to use            additional gain to the photomultiplier    -   2. An analog to digital converter (303), to convert the analog        signals into digital values (313).    -   3. A variable digital gain (304) to appropriately adjust the        digital signal levels prior to processing.    -   4. High rate pulse processing (305) for each detector subsystem        (301), for example the pulse processing systems disclosed in        U.S. Pat. No. 7,383,142, U.S. Pat. No. 8,812,268 and        WO/2015/085372, wherein the pulse processing comprises:        -   a. Baseline tracking and removal, or fixed baseline removal.        -   b. Detection of incoming pulses.        -   c. Computation of the energy of each detected pulse.        -   d. Accumulation of the computed energy values into an energy            histogram (energy histogram) (315).        -   e. Output of accumulated histogram values each time a gate            signal is received.        -   f. Reset of the histogram values for the next collection            interval.    -   5. A gate signal source (306) which outputs a gate signal (314)        at a regular pre-configured interval.        -   a. The gate interval is a constant short interval that            determines the histogram accumulation period.        -   b. This gate interval also determines the pixel pitch in the            resulting X-ray images. The pixel pitch is given by Gate            interval x sample speed. For example, a gate interval of 10            ms, and a sample moving on a conveyor at 0.1 m/s results in            a pixel pitch of 1 mm in the direction of travel.    -   6. In the absence of a gate signal source, and gate signal,        another appropriate means may be used to control and synchronize        the timing of energy histogram collection across all detectors.        For example, a suitably precise network timing signal may be        used instead of the gate signal.    -   7. Calibration System (307), which receives input from        appropriate analog and digital signals and then communicates the        desirable calibration parameters back to the various processing        blocks. The calibration system performs:        -   a. Pulse parameter identification        -   b. Gain calibration        -   c. Energy calibration        -   d. Baseline offset calibration (where fixed baseline is            used)        -   e. Count rate dependent baseline shift    -   8. Effective Z computation (308), which takes the computed        energy spectra in each detector during each gate interval and        determines the effective Z of the sample. This in turn leads to        the production of an effective Z image.    -   9. Intensity image generation including:        -   a. Intensity image (309), based on total received energy            across the energy spectrum.        -   b. High penetration or high contrast image (310) determined            by integration of selected energy bands from the full energy            spectrum.    -   10. Image post processing and display (311), with features that        may include one or more of the following:        -   a. Image sharpening        -   b. Edge detection and/or sharpening        -   c. Image filtering        -   d. Application of effective Z color map to color the image            pixels based on identified material.        -   e. Selection, display and overlay of 2D images for each            detector array            -   i. Effective Z            -   ii. Intensity            -   iii. High Penetration/High Contrast images        -   f. Display of images on an appropriate monitor or other            display device.

As described above, and illustrated in FIG. 9, the images produced fordisplay comprise a number of data elements recorded for each of Ndetector elements (501) and for each gate interval (500).

The data obtained for detector i during gate interval j is used in theproduction of effective Z, intensity and high penetration/high contrastimages as shown in FIG. 9. During the processing, a number of elementsare recorded in each pixel (502), including one or more of:

-   -   1. The X-Ray energy spectra.    -   2. The computed effective Z value    -   3. The intensity value (full spectrum summation)    -   4. High Penetration/High Contrast intensity values computed from        integration of one or more energy bands.

FIG. 9 illustrates how this data is arranged and built up into an imageof the scanned sample, prior to further post processing and imagedisplay.

Detector Subsystem

The detector subsystem used in common X-ray scanning machines, for bothindustrial and security applications, utilizes a scintillator (such asphosphor) coupled to an array of PIN diodes to convert the transmittedX-ray into light, and subsequently into an electrical signal.

So as to achieve a resolution in the order of 1-2 mm, more than 2,000detector pixels are used. Two separate detector arrays (and electronicreadout circuits) are required for detection of the low energy X-raysand the high energy X-rays.

When an X-ray impacts the detector it produces an electron charge in thedetector proportional to energy of the X-ray, wherein the higher theenergy is the more charge is induced in the detector. However, moredetailed examination of detector arrays have illustrated that detectorsystems do not have the resolution to detect individual X-ray photons,and instead they integrate all the charge produced by the detector pixelover a given time period and convert this into a digital value. Wherethe instantaneous flux of X-rays on the detector pixel is large, a largedigital value is produced (a bright pixel in the image) and where fewX-rays impact the detector a small digital value is produced (a darkpixel in the image).

The detector subsystem of this embodiment comprises:

-   -   a) A detector material    -   b) A photomultiplier material coupled to the detector material        using an appropriate means    -   c) Analog electronics

The detector material may be of dimensions X×Y×Z, or some other shape.The photomultiplier may be a silicon photomultiplier (SiPM) and thecoupling means may be a form of optical grease or optical couplingmaterial. It may be desirable to use a form of bracket or shroud to holdthe detector in position relative to the photomultiplier. Thephotomultiplier requires appropriate power supply and bias voltage togenerate the required level of amplification of the detected signal.

In an X-Ray scanning application, a large number of single elementdetector subsystems are required to produce each detector array. It maybe desirable to group these in an appropriate way, depending on thespecific X-Ray scanner requirements. Individual elements of detectormaterial may be grouped into a short array of M detectors. Small groupsof M detector elements may be mounted onto a single detector board, forexample 2, 4 or more groups of M onto one board. The full detector arrayis then made up of the number of detector boards required to achieve thetotal number N of detector elements per array.

Detector subsystems can be arranged in a number of differentconfigurations including: linear arrays of 1×N devices; square orrectangular arrays of N×M devices; or L-shaped, staggered, herringboneor interleaved arrays. One example of a detection device, used toconvert incoming radiation photons into and electrical signal, is thecombination of a scintillation crystal, coupled to a siliconphotomultiplier (SiPM) or multi-pixel photon counter (MPPC).

In such a detection device a scintillation crystal such as LSYO (1701)is used to convert the incoming radiation photon (1700) into UV photons(1703). In the case of LYSO scintillation material the peak emission ofUV photons occurs at 420 nm, other scintillation material such as thoselisted in Table 1 may have different emission peaks. Subsequent to theinteraction of the radiation photon (1700) with the scintillationcrystal (1701) to produce UV photons (1703) a multi-pixel photoncounter, or silicon photomultiplier (1704) with sensitivity in the UVregion (such as one with the performance metrics in Table 2) may be usedto detect these photons and produce an electrical signal.

FIG. 16A depicts a linear array of LYSO scintillation crystals (1600),indicative of how single detection devices can be joined together toform a linear array. In this indicative example the individual LYSOcrystals (1600) have a cross section of 1.8 mm and a height of 5 mm, theindividual LYSO crystals (1600) are wrapped around the sides in areflective material to assist in collecting all the UV photons. Thepitch of this exemplary array is 2.95 mm, the length is 79.2 mm and thewidth of the array is 2.5 mm.

FIGS. 16B and 16C depict a detector array from a top view and side viewrespectively, comprising the linear array of LYSO crystals depicted in16A coupled to an electrical pulse producing element (1604) on substrate(1605). The electrical pulse producing element may comprise a siliconphotomultiplier (SiPM). Enhanced specular reflector (ESR) or aluminiumor other reflective foil (1601) is disposed around side surfaces of thescintillation crystals to direct the scintillation photons onto thesilicon photomultiplier material (1604) and prevent light leakage(cross-talk) between adjacent detection devices. Optionally, opticalcoupling (1606) may be interposed between the LYSO crystals and SiPM,and may comprise any number of known suitable materials, for example, athin layer of optically transparent adhesive.

In another embodiment, scintillation crystals (1607) may be individuallycoupled to electrical pulse producing elements (1604), as depicted inFIGS. 16D and 16E. Coupling may be achieved by a number of methods, forexample interposing an optically transparent adhesive film (1609) oroptical coupling material between the scintillation crystals (1607) andelectrical pulse producing elements (1604), where the electrical pulseproducing elements (1604) may comprise SiPMs or an MPCC. Coupling may beperformed by a ‘pick and place’ assembly machine to individually alignand couple components and coupling material. Scintillation crystals maybe wrapped in a reflective material such as a foil or ESR material(1608) to aid in the capture of photons.

In any of the embodiments, the LSYO crystals (1600, 1607) may typicallyhave a cross-section (width) approximately 1-2 mm, a depth ofapproximately 1-2 mm, and height of approximately 3-5 mm, where thereflective or ESR film (1601, 1608) is approximately 0.05 mm-0.1 mmthick. In a preferred embodiment of the detectors shown in FIG. 16D thecross-section is 1.62 mm, the depth is 1.24 mm, the height isapproximately 4.07 mm, and the ESR film is 0.07 mm thick. The crosssectional area of the scintillator material is preferably greater than 1mm square, and may be greater than 2 mm square and less than 5 mmsquare.

While the exemplar detector subsystem design uses a scintillator whichis compact, robust, cost effective and non-hygroscopic, in the broadestaspect of the invention other detector subsystems can be considered.These include detector subsystems which use alternate inorganic orinorganic scintillator materials, the characteristics of some suchmaterial are provided in Table 1. Other mechanisms for convertingradiation photons into electrical signals could also be considered forthe detector subsystem. Some examples of other detector materialsoptions include:

-   -   a) High Purity Germanium (HPGe): Achieves ‘gold standard’        resolution of 120 eV for the Fe55 X-ray line at 5.9 keV,        detectors can be made >10 mm thick thus detect high energy        X-rays up to many 100 s of keV.    -   b) Silicon Drift Diode (SDD): SDD detectors measuring relatively        low energy radiation. For the same Fe55 line at 5.9 keV SDD        detectors have a resolution of approximately 130 eV. Also, these        detectors can be operated at higher count rates than HPGe        detectors and just below room temperature.    -   c) PIN Diodes: The detection efficiency for X-rays up to 60 keV        is substantially higher than SDD detectors and falls off to        approximately 1% for X-ray energies above 150 keV. These        detectors can be operated at room temperature, however,        resolution improves with cooling, resolution of the 5.9 keV line        is ˜180 eV,    -   d) Cadmium Zinc Telluride: Is a room temperature solid state        radiation detector used for the direct detection of mid-energy        X-ray and Gamma-ray radiation. It has a detection efficiency for        60 keV X-ray very close to 100% and even for X-rays photons with        energies of 150 eV the detection efficiency remains greater than        50%.    -   e) Cesium Iodine (CsI(Tl)): This is a scintillation material        used for detection of X-rays in medical imaging and diagnostic        applications. The scintillation material is used to convert the        X-ray into photons of light which are generally then converted        into an electrical signal either by a photomultiplier tube. CsI        is a cheap and dense material and has good detection efficiency        of X-rays and Gamma-ray to many 100 s of keV.

TABLE I properties of a range of scintillator materials. EmissionPrimary Light Max. Refractive Decay Time Yield Scintillator Density (nm)Index (ns) (Ph/MeV) NaI(Tl) 3.67 415 1.85 230 38,000 CsI(Tl) 4.51 5401.8  680 65,000 CsI(Na) 4.51 420 1.84 460 39,000 Li(Eu) 4.08 470 1.961400 11,000 BGO 7.13 480 2.15 300 8,200 CdWO4 7.9 470 2.3  1100 15,000PbWO4 8.3 500 — 15 600 GSO 6.71 440 1.85 56 9,000 LSO 7.4 420 1.82 4725,000 LSYSO 7.2 420 1.52 42 28,000 YAP(Ce) 4.56 370 1.82 27 18,000 YAG4.55 350 1.94 27 8,000 BaF2(fast) 4.88 220 1.54 0.6 1,400 LaCl3(Ce) 3.79330 1.9  28 46,000 LaBr3(Ce) 5.29 350 — 30 61,000 CaF2(Eu) 3.19 435 1.47900 24,000 ZnS(Ag) 4.09 450 2.36 110 50,000

TABLE 2 performance data for LYSO scintillators. Geometrical Data ActiveSensor Area 3.0 x 3.0 mm² Micropixel Size 50 x 50 μm² Number of Pixels3600 Geometrical Efficiency   63% Spectral Properties Spectral Range 300to 800 nm Peak Wavelength  420 nm PDE at 420 nm ² >40% Gain M ¹  ~6 x10⁶ Temp. Coefficient ¹${{\frac{1}{M}\mspace{14mu} \frac{\partial M}{\partial T}}} < {1\%}$° C.⁻¹ Dark Rate ¹ <500 kHz/mm² Crosstalk ¹ ~24% Electrical PropertiesBreakdown Voltage 25 ± 3 V Operation Voltage 10-20% Overvoltage ¹ ⁽¹⁾ at20% Overvoltage and 20° C. ⁽²⁾ PDE measurement based on zero peakPoisson statistics; value not affected by cross talk and afterpulsing.

A particular advantage of the scintillator and photomultiplierembodiment described here is the scalability of the detection elementsfor easy adaptability to large scanning systems such as are applicableto large freight items, which may be two or more metres in lineardimension. This is in contrast to direct conversion materials such asCadmium Zinc Telluride, which have unacceptable dead time as theindividual detector element area increases.

Processing Steps

The following sections outline the steps involved in processing eachparticular stage of the various algorithms.

1. Calibration

The scanning system comprises a large number of individual detectors.While each detector and associated electronics is ideally designed tohave identical response to incident radiation, in practice this will notbe possible. These variations between detectors result in detector todetector variation in energy spectrum output. By properly and fullycalibrating the detection system, the energy spectra output from thepulse processing digital processors can be appropriately calibrated sothey represent received X-ray intensity in known narrow energy bins.

1.1. Detector Pulse Calibration

Detector pulse calibration is used to identify the pulse characteristicsfor each detector required by the pulse processing system. The exactparameters required may vary, depending on the detection system. Fortypical applications using the pulse processing method disclosed in U.S.Pat. No. 7,383,142 and U.S. Pat. No. 8,812,268, the pulse is modelled asan averaged dual exponential of the form:

p(t)=∫_(t-T) _(a) ^(t) A[exp(−α(τ−t ₀)−exp(−β(τ−t ₀)]dτ  (Equation 1)

where α and β are the falling edge and rising edge time constantsrespectively, t₀ is the pulse time of arrival, T_(a) is the pulseaveraging window, and A is a pulse scaling factor related to the pulseenergy.

The processing requires the two parameters α and β, and the pulse formp(t) which can be obtained via an appropriate calibration method, orfrom knowledge of the design of the detection subsystem. A suitablemethod for estimating α, β and p(t) from received pulses is describedbelow.

1.2. Detector Gain Calibration

Each detector subsystem, combined with an analog to digital converter,will have slightly different characteristics due to manufacturingvariations. As a result of such component variations, the energy spectrawill be scaled differently. Variations other than gain scaling arehandled within the Baseline Offset Calibration or Energy Calibration.

The objective of the gain calibration is to achieve alignment of theenergy spectra output by the pulse processing electronics across alldetectors. The need for absolute accuracy may be reduced or eliminatedif per detector energy calibration is applied.

Gain calibration may be achieved in a number of ways. The followingapproach may be applied:

-   -   1. Setup a known X-Ray source.        -   a. A material with particular characteristics can be            inserted into the beam. For example, lead (Pb) has a known            absorption edge at 88 keV.        -   b. Make use of the known radiation of the detector material            (e.g. LYSO), detected by itself (the self spectrum).    -   2. Measure the energy spectrum on each detector, as output by        the pulse processing electronics.    -   3. Ensure sufficient data is obtained in order to achieve a        smooth spectrum with minimal noise.    -   4. Select a feature or features on which to perform the        alignment. For example,        -   a. A specific peak in the spectrum        -   b. An absorption edge (for the case of Pb)        -   c. The entire spectrum shape (appropriate for LYSO self            spectrum)    -   5. Compute the histogram bin corresponding to the feature        location for each detector.    -   6. Compute the median of these feature location bins across all        detectors.    -   7. The required gain for each detector is then computed as the        ratio of median location to the specific detector feature        location. Note: The median or other suitable reference (e.g.        maximum or minimum) is chosen. Median is chosen so some channels        are amplified, and some are attenuated, rather than attenuating        all channels to the minimum amplitude.    -   8. The gains are then applied to each detector channel. The gain        may be applied as an analog gain, digital gain, or combination        of the two, depending on particular system functionality. For        best results, at least part of the gain is digital gain, where        arbitrarily fine gain variation can be achieved.    -   9. Re-measure the energy spectrum on each detector and confirm        that the required alignment has been achieved.    -   10. If desirable, compute an updated/refined gain calibration        for each detector, and apply the updated calibration to each        detector.    -   11. Repeat steps 9 and 10 as often as desirable to achieve the        required correspondence between spectra from all detectors.

For the methods of effective Z computation outlined in this disclosure,it has been found that spectral alignment to within 1-2% can be achievedand is desirable for accurate and consistent effective Z results.

In a practical implementation of the detection subsystem there may be anumber of detector cards, each with a number of detectors. The totalnumber of detectors may be several thousand or more. Results from oneexample of such a detector board are presented here. The example boardcomprises 108 detectors, with in this case LYSO used as the scintillatormaterial. These detectors are packed into linear arrays of 27 detectors.Each detector board then uses 4×27 detector arrays to achieve a total of108 detectors.

When X-Rays are incident upon a detector, photons are emitted by theLYSO based on the energy of the incident X-Ray. Each detector is placedabove a SiPM, and it is the SiPM that detects and amplifies the emittedphotons. The detectors are coupled to the SiPM via an optical grease.The gain of each SiPM is determined by the bias voltage applied, and theSiPM breakdown voltage. As a result of variations in the LYSO material,quality of coupling between the LYSO and the SiPM, and also variationsin the SiPM gain and SiPM material properties, there can be considerabledifference in the received pulse energy for a given incident X-Rayenergy.

The effect of the variation in detected pulse energy is that the energyspectra from all detectors are not the same. This can be seen in FIG.11, where the uncalibrated received spectra from all 108 detectors areplotted. These energy spectra are measured where a sample of lead (Pb)is in the X-Ray beam, and the structure of the Pb spectrum is clearlyseen. It can be seen that the tail of the energy spectrum spreads acrossa range of approximately 150 histogram bins. This means the actualenergy per bin is quite different for each detector.

By following the gain calibration procedure outlined above, a set ofdetector gains was computed, as shown in FIG. 12. From the figure, thecalibrated gain value ranges from approximately 0.75 to 1.45.

After setting the digital gain to be equal to the detector gains in FIG.12, the Energy spectra from the 108 detectors were re-measured, as shownin FIG. 13. It is clear the energy spectra are now well aligned,indicating the success of the gain calibration. The different spectrumamplitude levels reflect the range of factors discussed above that canaffect the resulting energy spectrum. In this case, some detectors arecapturing an overall greater number of X-rays than others, indicated bythe higher spectrum amplitude. Nonetheless, the alignment of thespectral features is very good as required.

1.3. Baseline Offset Calibration

Each detector subsystem may have a slightly different baseline level, asmeasured at the output of the Analog to digital converter. In order forthe pulse processing electronics to accurately estimate the energy ofreceived pulses, the baseline is estimated and removed. Any suitablemethod can be used including, for example:

1. Offline measurement of baseline offset (with X-rays off):

-   -   a. Record and average a series of samples from the detector    -   b. Use this average as the baseline offset to be subtracted from        all data

2. Online baseline offset tracking and adaptation:

-   -   a. Use the pulse processing output to estimate and track        baseline offset    -   b. Filter the (noisy) tracked baseline values and update the        baseline offset register accordingly    -   c. Use an initial period of convergence with X-rays off,        followed by continuous adaptation while X-rays are on

1.4. Energy Calibration

The pulse processing electronics will produce an energy spectrum that isuncalibrated. That is, the output will comprises a number of counts in aset of histogram bins, but the exact energy of those histogram bins isunknown. In order to achieve accurate effective Z results, knowledge ofthe energy of each bin is required.

This is achieved as follows:

-   -   1. Use a source with known spectrum peaks. One suitable example        is a Ba133 source, with spectral peaks at 31, 80, 160, 302 and        360 keV    -   2. Measure the uncalibrated energy spectrum.    -   3. Determine the histogram bins corresponding to the known        spectrum peaks

Instead of using a single source with multiple peaks, it is alsopossible to use a narrow band source with variable (but known) energy,and measure the histogram bin as a function of energy for a range ofenergies.

Once a relationship between histogram bins and energy has been measured,it is possible to either:

-   -   1. Create a lookup table for the energy of each histogram bin.    -   2. Estimate parameters of a suitable functional form. For a        LYSO/SiPM combination it has been found a quadratic model fits        the observed parameters very well. This gives a result of the        form:

Histogram Bin=A*Energŷ+B*Energy+C  (Equation 2)

-   -    where A, B and C are constants determined from the measured        Ba133 spectrum. This formula is inverted to define Energy as a        function of Histogram Bin expressed in terms of the same A, B        and C.

If the variation between detectors is sufficiently small (requiring goodcomponent matching and good gain calibration), then a single energycalibration can be applied to all detectors. In this case, averaging thecalibration parameters across a number of detectors exposed to the Ba133source will yield a superior estimate of the Energy Calibrationparameters.

Alternatively, individual calibration table/calibration parameters canbe generated for each detector.

1.5. Count Rate Dependent Baseline Shift

Depending on detector/photomultiplier combination, it may be desirableto compensate for a count rate dependent baseline shift. The consequenceof this shift is a right shift of the energy spectrum as count rateincreases. To properly apply the energy calibration, the spectrum ismoved back to the left by a specified number of bins/energy. Thecalibration required is either

-   -   a) A lookup table, defining baseline shift for each count rate,        with intermediate results obtained via interpolation.    -   b) A functional form, where baseline offset is expressed as a        function of count rate.

Any suitable method can be used for this calibration, includinginjecting a known source spectrum of variable count rate, and recordingthe spectrum shift as count rate increases. Ideally the source has anarrow energy band so the shift can be clearly measured, and alsovariable energy so the offset can be calibrated as a function of energyif desirable.

The need for removal of count rate dependent baseline shift can bediminished or even eliminated if online baseline offset tracking andremoval is used.

1.6. Residual Spectrum Calibration

The residual spectrum is measured with a large mass of material in thebeam, sufficient to completely block the X-ray beam, such as a largethickness of steel. In practice, a small level of energy still reachesthe detector array, whether from scatter or other mechanisms, and thisresidual spectrum must be measured so it can be removed from thereceived spectra during normal operation.

The residual spectrum is then measured by averaging the received spectrafor a number of gate intervals with the blocking mass in the beam.

1.7. Pileup Parameters

The pileup parameters can be calibrated in several ways, for example:

-   -   a) Estimation of pileup parameters from the nature of the        received spectra.    -   b) Estimation of pileup parameters from knowledge of the signal,        the received pulse count rate, the ADC sampling rate and the        pulse detection method.    -   c) Measurement of the pileup parameters as follows:        -   i. Use a narrow energy source, where the energy and count            rate can be varied.        -   ii. Measure the received spectrum as the source energy and            count rate are varied.        -   iii. Directly measure the ratio of received 2-pulse and            3-pulse pileup to the main signal peak.        -   iv. Form a lookup table of 2-pulse and 3-pulse pileup as a            function of count rate and energy.

2. High Rate Pulse Processing

A high rate pulse processing system (305), such as those disclosed inU.S. Pat. No. 7,383,142, U.S. Pat. No. 8,812,268 or WO/2015/085372, isallocated to each detector subsystem, to perform the followingoperations on the digitized pulse signal output from the analog todigital converter:

-   -   a) Baseline tracking and removal, or fixed baseline removal.    -   b) Detection of incoming pulses.    -   c) Computation of the energy of each detected pulse.    -   d) Accumulation of the computed energy values into an energy        histogram (energy histogram)    -   e) Output of the accumulated histogram values each time a gate        or other timing signal is received    -   f) Reset of the histogram values for the next collection        interval.

3. Intensity Image

The intensity value, or more specifically transmission value, iscomputed from the energy spectrum generated for each detector i at eachgate interval j according to:

$\begin{matrix}{{R\left( {i,j} \right)} = \frac{\sum_{B}{I(B)}}{\sum_{B}{I_{0}(B)}}} & \left( {{Equation}\mspace{14mu} 3} \right)\end{matrix}$

where the summations are performed over all histogram bins B (orequivalently, over all energies E), for the received energy spectra(I(B)) and reference energy spectra (I_(o)(B)).

Elements within the intensity image may be classified as:

a) Impenetrable, if R(i, j)<R_(low), and set to 0.

b) Empty, or nothing in beam, if R(i,j)>R_(high), and set to 1.

The thresholds R_(low) and R_(high) may be pre-set or user configurable.

4. High Contrast Images

Through use of a full energy spectrum, intensity images with varyingcontrast are generated based on integrating the received spectrum acrossdifferent energy bands. In existing dual energy X-ray scanners, thesystem can only utilize the broad energy range inherent in the detectormaterial. When a full energy spectrum is available, arbitrary energyranges can be used to generate associated intensity images in thatenergy range. Specific energy ranges can then be defined in order tobest isolate and display particular material types, with energy rangestuned, for example, for organic material, inorganic material, or light,medium or heavy metals.

The high contrast/high penetration images are generated for eachdetector i at each gate interval j according to:

$\begin{matrix}{{R_{E\; 12}\left( {i,j} \right)} = \frac{\sum_{E\; 1}^{E\; 2}{I(E)}}{\sum_{E\; 1}^{E\; 2}{I_{0}(E)}}} & \left( {{Equation}\mspace{14mu} 4} \right)\end{matrix}$

where E1 and E2 are the lower and upper limits of energy range E12. Theenergy band may be user defined or pre-configured. One, two or moredifferent energy bands may be configured to enable the user to selectbetween images of interest.

5. Effective Z Processing

The effective Z processing involves the use of full energy spectracomputed by the pulse processing electronics, combined with the energycalibration, to compute an estimate of the effective Z of the samplematerial. The effective Z processing is performed for every detector,and for each detector proceeds as follows (so for a 1×N detector array,this process is repeated N times). To reduce computational requirement,the effective Z processing is only performed for received detectors iand gate intervals j that are not declared either impenetrable or empty.

5.1. Preliminary Operations.

-   -   1. With reference to FIG. 4, compress the energy spectrum data        (400) using an FFT, and discard all but the first N bins (which        are selected such that the discarded bins contain little or no        signal). Note: this step is optional, but for a system        configuration where effective Z is computed on a central        processing computer, it enables a significant communication        bandwidth reduction. Transfer of 32 complex FFT bins for a 512        point histogram requires only ⅛ of the communication bandwidth.    -   2. Perform spectrum integration (402), by averaging a number        2S+1 of received FFT'ed energy spectra. This spectrum        integration increases the measurement time available for        computing the effective Z without reducing the spatial        resolution at which the intensity image is computed. The        integration is done across gate intervals j−S≦j≦j+S, so as to        perform a moving average centered on gate interval j. If no        integration is required, set S=0.    -   3. Perform pileup reduction (403). The FFT is the first stage of        the pileup reduction, which is not required if data compression        has already been achieved using an FFT. The pileup reduction can        be achieved with a suitable algorithm as outlined below.    -   4. If desirable, apply a FFT domain phase shift (404) in order        to achieve a desired lateral shift of the energy spectrum. This        step has been found to be desirable where a count rate specific        baseline shift exists. Note: multiplication by a linearly        increasing (with FFT bin) phase term in the FFT domain results        in a lateral shift after iFFT. The extent of the lateral shift        is determined by the slope of the linear increase.    -   5. Prior to iFFT, apply a frequency domain window (405). This        window can be used to design a desired smoothing of the energy        spectrum. The window design process is outlined below. A good        window has been designed to achieve a smooth filtering of the        energy spectrum. Filtering of the noise in the energy spectrum        allows the possibility of using a reduced number of energy bins        in the effective Z computation for overall improvement in        computational efficiency.    -   6. Zero pad the FFT data, insert the complex conjugate into the        second half of the FFT buffer (406), and apply iFFT (407). At        this point a smoothed energy spectrum is obtained in the form of        a histogram.        -   The zero padding inserts data that was truncated after the            FFT. It is not essential to insert zeros for all truncated            bins. For example, padding less zeros can produce a smaller            FFT buffer which it is more computationally efficient to            compute the IFFT. For a real vector x, and FFT size 2N, the            elements N+2 to 2N of the FFT output are the complex            conjugate of the elements 2 to N. Here N+1 will be one of            the elements set to zero by the zero padding.    -   7. Subtract the residual spectrum for each detector. As noted        previously, this removes any spectrum that would be present even        in the presence of a completely blocking material.    -   8. Apply the energy calibration curve/function (408) to convert        the histogram bins into energy values. Note: Alternatively the        energy calibration can be applied within the effective Z routine        itself. At this stage the output is a smooth calibrated energy        spectrum (409).    -   9. If required, perform spectrum integration across adjacent        detectors so integration over 2P+1 energy spectra for detectors        i−P≦i≦i+P. While integration over gate intervals can be        performed in the FFT domain, integration over adjacent detectors        can only be performed after energy calibration has been applied,        since the raw histogram bins of adjacent detectors may not        correspond to the same energy. By performing 2D spectrum        integration the material identification performance can be        improved compared to performing the effective Z processing on a        single pixel.

5.2. Reference Spectrum Measurement.

In order to compute effective Z (and also the intensity/high contrastimages), a reference spectrum is obtained with X-rays on, but before thesample reaches the X-ray beam. Within a given machine design, there willbe a delay between the time X-rays are turned on and when the samplereaches the X-ray beam during which the reference spectrum can becollected. The process is as follows:

-   -   1. Turn on X-rays.    -   2. Wait for X-ray beam to stabilize. This can be achieved by a        time delay or by filtering X-ray counts until the variation        diminishes below a specified threshold.    -   3. Collect and sum N X-ray energy spectra I₀(E, n) (that is,        collect the energy spectrum recorded at the end of N successive        gate intervals) at the output of pulse processing electronics.    -   4. Divide the sum of spectra by N to compute an average        reference spectrum so

$\begin{matrix}{{I_{0}(E)} = {\frac{1}{N}{\sum_{n = 1}^{N}{I_{0}\left( {E,n} \right)}}}} & \left( {{Equation}\mspace{14mu} 5} \right)\end{matrix}$

-   -    where I₀(E) is the reference number of counts at energy E, N is        the number of gate intervals, and E is the energy level of the        X-rays.

If at any time during the reference collection a sample is detected inthe X-ray beam, then the accumulation of reference spectra ceases andthe average of M collected spectra can be used for the reference, or themeasurement terminated if M is insufficient.

5.3. Load or Create a Table of Mass Attenuation Constants

The mass attenuation constants for a given effective Z and given energydefine the extent to which the given material Z will attenuate X-rays ofenergy E. In particular, the intensity of received energies at aparticular energy will be given by:

I(E)=I ₀(E)exp(ma(Z,E)ρx)  (Equation 6)

where I(E) is the received number of counts at energy E, I₀(E) is thereference number of counts at energy E, ma(Z,E) is the mass attenuationconstant for material with effective atomic number Z at energy E, ρ isthe material density and x is the material thickness relative to thereference thickness used in the creation of the mass attenuation data.

Mass attenuation data is available at a finite (small) number ofenergies, perhaps every 10, 20 or 50 keV, whereas the energy spectracreated by the method disclosed in this disclosure may be generated atenergy spacing as little as 1 keV or even less. In practice a finitenumber of these energy values will be selected for use in the effectiveZ computation.

In order to achieve a smooth mass attenuation table at all energies inthe energy spectrum, data for intermediate energies for each Z areobtained using cubic spline interpolation or other suitableinterpolation method. The mass attenuation values as a function ofenergy are considered sufficiently smooth that a cubic spline is a goodinterpolation method to apply.

5.4. Effective Z Computation

The effective Z processing then proceeds as follows:

-   -   1. For each detector, and each gate period (a specified detector        at a specified gate period defining a pixel in the resultant        image), a calibrated energy spectrum will be measured as        outlined in the “preliminary operations” section. Effective Z        processing is not performed for energy spectra classified as        impenetrable or empty.    -   2. Determine a set of energy bins to be used for effective Z        computation.        -   a. Based on the received spectrum, identify the energy            region where sufficient counts are received.        -   b. These will be the spectrum bins where the counts exceed            some predetermined threshold.        -   c. Alternatively, determine the energies where the            transmission (ratio of received to reference spectrum)            exceeds a threshold.    -   3. For each Z value for which mass attenuation data is available        at each of the energy bins, perform the following operations:        -   a. Estimate the material thickness for the assumed Z. One            possible method is to estimate the thickness at one energy            value E according to

$\begin{matrix}{= {{- {\log \left( \frac{I(E)}{I_{0}(E)} \right)}}\frac{1}{{ma}\left( {Z,E} \right)}}} & \left( {{Equation}\mspace{14mu} 7} \right)\end{matrix}$

-   -   -    where I(E) is the received number of counts at energy E,            I₀(E) is the reference number of counts at energy E, ma(Z,E)            is the mass attenuation constant for material with effective            atomic number Z at energy E, ρ is the material density and x            is the material thickness relative to the reference            thickness used in the creation of the mass attenuation data.        -    An improved thickness estimate can be obtained by averaging            the thickness estimate at a number of energies to reduce the            impact of noise at the single energy. It is not desirable to            estimate x explicitly, the combined parameter ρx is            sufficient.

    -   b. Compute a predicted spectrum for this Z, based on the        reference spectrum recorded previously, the thickness parameter        and the ma table according to

{circumflex over (I)}(Z,E)=I _(o)(E)exp(

ma(Z,E))  (Equation 8)

-   -    computed at all selected energies E, where I(Z, E) is the        predicted spectrum.    -   c. Compute a cost function for this Z as the sum of the squared        errors between the received spectrum and the predicted spectrum        under the assumption of material Z

C(Z)=Σ_(E) w(E)[I(E)−{circumflex over (I)}(Z,E)]²  (Equation 9)

-   -    where C(Z) is the cost function, and w(E) represents weights        for each sum of the squared errors between the received spectrum        and the predicted spectrum.    -    The weights w(E) can be chosen to be unity, or alternatively        w(E)=I(E) will result in a cost function that gives lower weight        to regions of the received spectrum where the number of counts        is small, and greater weight to regions where more counts are        received.    -   4. For this pixel (constituting an energy spectrum received from        a specific detector during a specific gate period), compute the        estimated effective Z as the Z value which minimizes the cost        function:

$\begin{matrix}{\hat{Z} = {\min\limits_{Z}{C(Z)}}} & \left( {{Equation}\mspace{14mu} 10} \right)\end{matrix}$

It should be noted that there is no particular requirement for effectiveZ to be integer, and in fact the mass attenuation table may containvalues for non-integer values of Z representing composite materials.However, it is clearly not possible to represent a continuum of possibleZ values in a finite table. In order to compute Z to arbitraryprecision, it is possible to interpolate the cost function to therequired resolution using an appropriate interpolation algorithm. Thevalue of Z chosen is then the value which minimizes the interpolatedcost function. The cost function C(Z) is a smooth function, andtherefore an actual floating point or continuous value of Z whichminimises this smooth function can be reliably predicted from the curvevia some form of interpolation.

In addition, it is also noted that step 3 above indicates the costfunction is computed for all available Z values in the mass attenuationtable. In practice, depending on the behavior of the cost function,efficient search methods can be applied to reduce the computationalrequirements. Such methods include one or more of the following:

1. Gradient search

2. Best first search

3. Some form of pattern search

The cost function form has been chosen so as to be relativelyinsensitive to noise on the spectrum.

6. Effective Z Processing Using Material Calibration

In practice, due to detector and processing characteristics that can bedifficult to characterize, it can be difficult to achieve accurateenergy calibration across all detectors, all count rates and allspectrum bins.

An alternative method has been developed whereby the system iscalibrated using varying thickness samples of known materials. The aimis to calibrate the expected received spectra as a function of material,material thickness, and energy histogram bins. This avoids therequirement for absolute energy calibration, and also largely avoids theeffect of spectrum shift with count rate (if present). The need forpileup removal may also be eliminated.

6.1. Material (Self) Calibration Process

Ideally, with good gain calibration, the received spectra from alldetectors are consistent with each other, and so it is only desirable toobtain calibration data at one detector for use at all detectors. Inpractice, it is likely to be desirable to obtain calibration data forgroups of adjacent detectors or possibly every detector, depending onthe consistency between detectors.

The first step in the calibration process is to obtain a referencespectrum I₀(B) at each histogram bin B, with no material in the X-Raybeam for the detector(s) to be calibrated. Histogram bins will now bedenoted by B rather than E to denote that there is no requirement tocalibrate the bins in terms of their exact energy.

Then, for each material, to calibrate:

-   -   1. Ascertain the effective Z of the material (either by        independent measurement, or by specification of material        purity).    -   2. Obtain a “step wedge” of the material. That is, a sample of        the material that comprises a series of steps of known        thickness x. The largest step is ideally sufficient to reduce        the X-ray beam to a level where it can be considered        impenetrable. Note: other material samples can be used, but such        a step wedge is a convenient form to calibrate against.    -   3. Scan the step wedge at the required detector location. The        result will be a series of uncalibrated energy spectra recorded        along each step of the material (the number of spectra will        depend on the sample dimensions, the scanning speed and the gate        period).    -   4. Sum the spectra received on each step to minimize the noise        in the spectra. These spectra are denoted I(Z, B, x), since they        are a function of the material, the histogram bin and the        material thickness. Note also that I(Z, B, 0) is just the        reference spectrum I₀(B).    -   5. Compute the transmission characteristic for all materials,        histogram bins and thickness as

$\begin{matrix}{{{Tx}\left( {Z,B,x} \right)} = \frac{I\left( {Z,B,x} \right)}{I_{0}(B)}} & \left( {{Equation}\mspace{14mu} 11} \right)\end{matrix}$

-   -   6. Compute the total transmission as a function of Z and x as

$\begin{matrix}{{R\left( {Z,x} \right)} = \frac{\Sigma_{B}{I\left( {Z,B,x} \right)}}{\Sigma_{B}{I_{0}(B)}}} & \left( {{Equation}\mspace{14mu} 12} \right)\end{matrix}$

-   -    again noting that R(Z, 0)=1 for all Z

The tables of Tx(Z,B,x) and R(Z,x) together form the calibration tablesthat are used to estimate effective Z at each pixel (detector/gateinterval). As previously stated, they may or may not be a function ofdetector also, depending on the equivalence of data from all detectors.

Clearly it is desirable to calibrate against samples of all possiblematerials, however in practice only a subset of the full continuum ofmaterials and mixtures can be sampled. To achieve table entries forintermediate Z values it is desirable to interpolate both Tx and Rfunctions to intermediate values of Z to expand the table coverage.

Having obtained the calibration tables, it is now possible to estimateeffective Z for an unknown material sample as follows.

6.2. Preliminary Operations.

Preliminary operations are substantially the same as described above,with the following comments:

-   -   1. It may not be desirable to perform pileup removal.    -   2. It may not be desirable to perform lateral spectrum shift to        compensate for count rate dependent baseline shift exists.    -   3. The frequency domain window is still required prior to iFFT.    -   4. The energy calibration curve is not applied, as there is no        requirement for absolute energy calibration with this method,        but removal of residual spectrum may still be required.    -   5. Integration of spectrum can be performed across gate        intervals, and across detectors as described below.    -   6. The received spectrum will be denoted I(B), the intensity in        a series of histogram bins B. The use of B differentiates from        the use of E for the previous section where the histogram bins        are calibrated in terms of their actual energy.

6.3. Reference Spectrum Measurement.

The reference spectrum is obtained in exactly the same manner asdescribed above, but is now denoted I₀(B), denoting the use of histogrambins, rather than energy.

6.4. Effective Z Computation.

The effective Z processing then proceeds as follows:

-   -   1. For each detector, and each gate period (a specified detector        at a specified gate period defining a pixel in the resultant        image), an uncalibrated energy spectrum I(B) will be measured as        outlined in the “preliminary operations” section. Again,        effective Z processing is not performed for energy spectra        classified as impenetrable or empty.    -   2. Determine a set of histogram bins to be used for effective Z        computation:        -   a. Based on the received spectrum, identify the region where            sufficient counts are received.        -   b. These will be the spectrum bins where the counts exceed            some predetermined threshold. Choose B: I(B)>I_(min)        -   c. Alternatively, determine the bins where the transmission            (ratio of received to reference spectrum) exceeds a            threshold.        -   d. Alternatively, use all available histogram bins and apply            a weighting in the cost function to remove undesired bins            from the cost calculation.        -   e. Note: ultimately reducing the total number of histogram            bins processed will achieve improved computational            efficiency, so use of every bin is not ideal.    -   3. Compute the total received X-rays as a ratio to the        reference.

$\begin{matrix}{R = \frac{\Sigma_{B}{I(B)}}{\Sigma_{B}{I_{0}(B)}}} & \left( {{Equation}\mspace{14mu} 13} \right)\end{matrix}$

-   -   4. For each Z value for which calibration data is available,        perform the following operations:        -   a. Estimate the material thickness from the total received            transmission R and the calibration table values of R(Z, x)            for this material Z. This achieved via            -   i. Interpolation of the curve of R(Z, x) at the measured                value of R to obtain a corresponding {circumflex over                (x)}, via for example cubic spline interpolation.            -   ii. From the calibrated R(Z, x) obtain a functional form                x=f(R, Z) to compute x as a function of material and                transmission.        -   b. From the table of R(Z, x) find x₁ and x₂ such that R(Z,            x₁)≦R<R(Z, x₂). Note that x₁=0 corresponds to the reference            spectrum, and if the received transmission R is smaller than            a table entry then use the final 2 entries for x₁ and x₂,            and the result will be an extrapolation to a thicker            material.        -   c. Now use the calibrated transmission tables Tx(Z, B, x) to            determine local mass attenuation coefficients for each            histogram bin according to:

$\begin{matrix}{{\left( {Z,R,B} \right)} = {\log \left( \frac{{Tx}\left( {Z,B,x_{2}} \right)}{{Tx}\left( {Z,B,x_{1}} \right)} \right)}} & \left( {{Equation}\mspace{14mu} 14} \right)\end{matrix}$

-   -   -   -   d. Then compute an expected received spectrum according                to

$\begin{matrix}{{\hat{I}\left( {Z,B} \right)} = {{{Tx}\left( {Z,B,x_{1}} \right)}{I_{o}(B)}{\exp \left( {\left\lbrack \frac{\hat{x} - x_{1}}{x_{2} - x_{1}} \right\rbrack \left( {Z,R,B} \right)} \right)}}} & \left( {{Equation}\mspace{14mu} 15} \right)\end{matrix}$

-   -   -   -    This expected received spectrum is an interpolated                received spectrum between the nearest two calibration                spectra, but based on the different attenuation observed                at each bin. Other forms of interpolation between                spectra could be used, but the material specific                interpolation used here provides a superior                interpolation result.            -   e. Compute a cost function C(Z) for this Z as the sum of                the squared errors between the received spectrum and the                predicted spectrum under the assumption of material Z

C(Z)=Σ_(B) w(B)[I(B)−{circumflex over (I)}(Z,B)]²  (Equation 16)

-   -   -   -    The weights w(B) can be chosen to be unity, or                alternatively w(B)=I(B) will result in a cost function                that gives lower weight to regions of the received                spectrum where the number of counts is small, and                greater weight to regions where more counts are                received.

    -   5. For this pixel (constituting an energy spectrum received from        a specific detector during a specific gate period), compute the        estimated effective Z as the Z value which minimizes the cost        function:

$\begin{matrix}{\hat{Z} = {\min\limits_{Z}{C(Z)}}} & \left( {{Equation}\mspace{14mu} 17} \right)\end{matrix}$

It should be noted that there is no particular requirement for effectiveZ to be integer, and in fact the self calibration table may containvalues for non-integer values of Z representing composite materials.However, it is clearly not possible to represent a continuum of possibleZ values in a finite table. In order to compute Z to arbitraryprecision, it is possible to interpolate the cost function to therequired resolution using an appropriate interpolation algorithm. Thevalue of Z chosen is then the value which minimizes the interpolatedcost function. The cost function C(Z) is a smooth function, andtherefore an actual floating point or continuous value of Z whichminimises this smooth function can be reliably predicted from the curvevia some form of interpolation.

The same form of efficient search methods can be used to reducecomputation and avoid an exhaustive search over all materials Z in thecalibration table.

6.5. System Adaptation

Some system parameters will vary over time, so the system adapts inorder to maintain calibration over time:

-   -   1. Gain calibration update.        -   a. Calibration spectra are measured during periods when            X-rays are off        -   b. Gain is updated according to changes observed in the            measured spectra        -   c. Gain is A*old gain+B*new gain, where A+B=1, and B will be            small to avoid noise and allow slow adaptation.    -   2. Pulse calibration update.        -   a. Periodically a new pulse calibration may be performed,            although pulse parameters have been found to remain            sufficiently constant over time that at most daily or            perhaps weekly or monthly recalibration of pulse parameters            may be required.    -   3. baseline offset update        -   a. This may be done during periods when X-rays are off, in            the same way as the initial calibration is performed—a short            dataset is required for baseline offset.        -   b. Adapted continuously via a baseline tracking algorithm as            described below.    -   4. Energy calibration, count rate dependent spectrum shift,        pileup parameters and residual spectrum may require occasional        off-line recalibration. It may also be found that for a given        machine these rarely, if ever, require recalibration.    -   7. Effective Z Processing Example

The following is an overview of the process used to calibrate detectorboards, in particular implementing a self calibrating process and withthe option of using ‘floating point’ effective Z computation:

-   -   1. Obtain calibration wedges of known material, ideally pure or        close to pure elements. For the current calibration, 3 materials        were used:        -   a. Carbon (Z=6)        -   b. Aluminium (Z=13)        -   c. Stainless Steel (Z approx 26)    -   2. The step dimensions are chosen with the following in mind:        -   a. A width of 30 cm is used to ensure a large number of            detectors could be calibrated with 1 calibration scan.            -   i. Projection mode is used to effectively increase the                number of pixels that could be calibrated in            -   ii. With 30 cm wedges, 2 calibration heights can cover                the 5 detector boards with sufficient overlap to avoid                edge effects.        -   b. Step heights were determined to try to get a reasonably            uniform transmission spacing from something <0.5% up to 95%.            -   i. For carbon, achieving less than 0.5% transmission                required something like 300 mm of material.            -   ii. For heavier metals, achieving 95% transmission                required very thin samples, 0.5 mm and less. For metals                such as tin (not used here) this was extremely                difficult.        -   c. Step length is 50 mm. When scanned at 4% normal speed,            the scan speed is 8 mm per second, so approximately 6            seconds of data could be collected from each step. This is            necessary to ensure very accurate calibration spectra, given            the accuracy required from the eventual effective Z            processing.    -   3. The material wedges are scanned, and the resulting data is        processed offline in Matlab as follows:        -   a. For each pixel of each scan, determine the start and end            locations of the step.        -   b. Allow some margin, to avoid any effects near the step            edges.        -   c. For each step identified:            -   i. Extract the binary data corresponding to the measured                spectrum at each slice of the step.            -   ii. Integrate all data, so as to establish a very                accurate spectrum (with >5 seconds of data)            -   iii. Compute the corresponding total intensity (relative                to a long term average of the source spectrum measured                during the same calibration run with nothing in beam)        -   d. Create a table for each step (intensity) of each            material, containing:            -   i. A mapping of step thickness to step intensity. This                table is used to interpolate any measured spectrum into                an equivalent material thickness.            -   ii. A series of calibration spectra, including a                reference spectrum. Each spectrum represents a material                thickness, from which spectra for intermediate material                thicknesses can be interpolated.

The calibration data for the 3 materials with Z=6, 13, 26 is adequatefor the production of a 3 colour image, classifying the material aseither organic (close to Z=6), inorganic/light metal (close to Z=13) ormetal (close to Z=26). In order to achieve the core objective ofaccurate effective Z estimation to separate materials down to +/−0.2 Zor better, it is necessary to obtain calibration data from a much largerset of materials, from which a continuous estimate of Z could then beobtained. It is not practical to run calibration scans for all materialsfrom Z=3 to Z=92, so a range of additional calibration data sets wereobtained by interpolation. Calibration sets for Z=3 to Z=13 wereobtained from interpolation/extrapolation of the Carbon and Aluminiumdata sets. Calibration sets for effective Z=13 to Z=50 may be obtainedfrom interpolation of the Aluminium and Stainless Steel data sets.

For every pixel in the scanner, the procedure for obtaining theadditional calibration data sets is as follows:

-   -   1. For each of Z=6, 13, 26 interpolate the calibration spectra        to a new set of intensities. For the current demonstration, the        intensities (in percent) used were: 95, 90, 80, 70, 60, 50, 40,        30, 20, 15, 10, 6, 4, 2, 1, 0.5, 0.2. At this point there is now        a calibration table for each material at a common set of        intensities. The process now is to create calibration tables for        other materials at those same set of common intensities.    -   2. For the current demonstration the set of required materials        is Z=3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22,        24, 26, 30, 35. The spectrum for material Z, at histogram B, at        thickness x (which here corresponds to one of the defined        transmission levels) is denoted I(Z, B, x). For each required        material, for each intensity, the new interpolated material        spectrum is obtained as follows:

a.  If  Z_(—)new <  = 13${I\left( {Z_{new},B,x} \right)} = {{{I\left( {6,B,x} \right)}\frac{\left( {13 - Z_{new}} \right)}{7}} + {{I\left( {13,B,x} \right)}\frac{\left( {Z_{new} - 6} \right)}{7}}}$b.  If  Z_(—)new > 13${I\left( {Z_{new},B,x} \right)} = {{{I\left( {13,B,x} \right)}\frac{\left( {26 - Z_{new}} \right)}{13}} + {{I\left( {26,B,x} \right)}\frac{\left( {Z_{new} - 13} \right)}{13}}}$

-   -   3. The new tables are then included in the total set of        calibration data used for effective Z processing.    -   4. All calibration tables are saved in a file format appropriate        for input to PoCC software.

There are some important points to note here:

-   -   1. For Z<6, the process is an extrapolation rather than        interpolation—one of the coefficients goes negative, while the        other is greater than 1. While it appears to have worked        acceptably well down to Z=3, some care needs to be taken with        extrapolation as it may diverge quickly.    -   2. Similarly for Z>26, the process is extrapolation. Here it        would be better to include calibration data for tin Sn and then        also lead Pb to fill out the available calibration data. The        challenge with these higher Z materials is to get a sensible        calibration curves at 90% transmission—the material sample must        be very thin to achieve this transmission.    -   3. By including values of Z below 3, the cost function behaves        reasonably well in the region of interest around Z=6. This        ensures the process for computing continuous/floating point        effective Z is able to correctly determine Z values around        6—essentially avoiding anomalies at the edges, or at least        pushing them to Z values outside the range of interest.    -   4. More sophisticated interpolation may be required to avoid        common point of intersection—this is acceptable for lower Z but        ceases to hold true when moving into the metals. It may be        necessary to interpolate several spectra to obtain each new        interpolated material.    -   5. The overall performance is somewhat limited by the use of        just 3 actual measured materials. In fact it is quite remarkable        that such excellent performance has been achieved given the        spacing of the calibration materials.    -   6. Higher Z materials such as lead Pb have absorption edges, and        so some consideration eventually needs to be given to these        materials if accurate performance at high effective Z is to be        achieved. To this point, absorption edges have not been        specifically incorporated into the model.

The cost function C(Z) is a smooth function, and therefore an actualfloating point or continuous value of Z which minimises this smoothfunction can be predicted from the curve via some form of interpolation.

The results of the interpolation process are shown in FIG. 14 for the10% transmission case. It can be seen there is a very smooth progressionthrough all of the materials, and this is what results in thediscriminating power of the effective Z processing. Any measuredmaterial in the effective Z range can be placed somewhere in this set ofcurves, with the exact displacement from calibration curves used todetermine a very accurate estimate of the material effective Z.

Implementation of floating point effective Z has been based around aquadratic interpolation, using the cost function values at the Z valuethat minimises the cost function, and the Z value either side of this,with some special consideration at the edges. This approach has yieldedeffective Z results which (with sufficient spectrum integration) haveaccurately resolved materials where the known effective Z difference isless than 0.2.

The process for computation of a continuous/floating point estimate ofeffective Z is as follows:

-   -   1. Compute the cost function C(Z) at every Z value in the        calibration table.    -   2. Find the value of Z for which C(Z) is minimised.    -   3. Find the values of Z and associated cost function values for        the Z values either side of the Z value which minimises C(Z).    -   4. The coefficients a quadratic model are estimated, where the        model in the region of the minimum is:

C(Z)=a ₀ +a ₁ Z+a ₂ Z ² +n

-   -    where n is noise on the cost function. This is in turn modelled        in matrix equation form for the 3 Z values Z1, Z2 and Z3 and        associated cost function values C1, C2 and C3, with

C=Ha+n

-   -    and where

$H = \begin{matrix}1 & Z_{1} & Z_{1}^{2} \\1 & Z_{2} & Z_{2}^{2} \\1 & Z_{3} & Z_{3}^{2}\end{matrix}$ $a = \begin{matrix}a_{0} \\a_{1} \\a_{2}\end{matrix}$ $C = \begin{matrix}C_{1} \\C_{2} \\C_{3}\end{matrix}$

-   -    and the solution is obtained via matrix inversion as:

{circumflex over (a)}=(H′H)⁻¹ H′C

-   -    The general form inv(H′H)H′C is used to accommodate the case        where more than 3 Z and C values are used to estimate the        quadratic coefficients.    -   5. Compute the value of Z which minimises the quadratic        function. The value of Z at which there is a turning point is        simply:

$\hat{Z} = \frac{- a_{1}}{2a_{2}}$

-   -    By design, one of the Z values (usually Z2 except at edges) is        a minimum, so the resulting optimal Z can be assumed to be a        minimum rather than a maximum. At edges, there can be issues,        but this needs to be treated separately.

In the disclosed embodiment, the following observations are made:

-   -   1. By design, one of the Z values (usually Z2 except at edges)        is a minimum, so the resulting optimal Z can be assumed to be a        minimum rather than a maximum. At edges, there can be issues,        but this needs to be treated separately.    -   2. If the value of Z which minimises the cost function is at        either edge, then it is necessary to use 2 values to one side of        the minimum Z value. The floating point calculation may then        become an extrapolation to a point outside the range of Z values        in the calibration table. When this occurs, the Z estimate can        diverge quickly, so care needs to be taken to put a limit on        then maximum or minimum Z value estimate (i.e. how much        extrapolation is allowed)    -   3. The inclusion of Z values below 6 and above 26 is designed to        ensure the edge effects described above do not adversely affect        the Z estimates, particularly in the region of interest around        Z=6.    -   4. There are likely more computationally efficient ways of        obtaining the quadratic coefficients and associated estimate of        the minimum. This has not been explored at this stage.    -   5. In fact, for a given set of Z values, all necessary matrices        and inverses can be computed offline and stored for more        efficient use, since they only depend on the Z values and Z        spacing, not the measured spectrum and cost function.    -   6. The quadratic model is acceptable where the cost function is        well behaved, smooth and relatively noise free. Where very short        integration times are used to collect the energy spectrum        histograms, the cost function can become noisy and may converge        on a local minimum due to noise. In this case, and in general, a        more sophisticated interpolation model may be required to smooth        the cost function and avoid noise effects. This may involve more        than 3 points in the interpolation process.

The quadratic model is just a model to ensure a consistent effective Zis obtained for a particular material. It is not intended to be anaccurate functional model of the cost function behaviour, and it is notconsidered necessary. The principle objective is to obtain an estimateof effective Z that is consistent for a particular material, and enablesreliable separation of closely spaced materials. The quadratic modelachieves this objective.

The floating point effective Z algorithm was tested on a range ofmaterial samples and also tested extensively on the briefcase. Therewere several observations made about the performance.

-   -   1. At high transmission values—corresponding to very thin/low        attenuation samples—the cost function could become noisy, and        also the calibration curves for higher Z often poorly        interpolated to >90% transmission. As a result, the output        tended to over emphasise higher Z values.    -   2. At very low transmission, and in the vicinity of large        changes in transmission levels such as near the edge of metal        blocks, some scatter could be present in the received spectrum        resulting in an output biased towards organic, even where the        material was known to be metal.    -   3. A-priori knowledge of likely effective Z gave the following        heuristics:        -   a. High transmission is more likely to be an organic or            lower Z material, since very large        -   b. Low transmission is more likely to be a higher Z            material, since very large thicknesses of low Z material            would be required.

As a result of these observations, a weighting v(Z,I) was introduced inorder to tune the cost function as a function of both intensity and Z.These cost function weights are tuned in order to ensure the effective Zoutput is as required for known test samples. In PoCC the implementationhas been confined to 3 discrete regions:

-   -   1. High transmission, I>high threshold        -   For high transmission, the output was found to be somewhat            biased towards high Z when fairly thin organic materials            were scanned. Hence the cost weights were low for organics,            and increasing at higher Z.    -   2. Mid Transmission, low threshold<I<high threshold        -   In the mid range of transmission, the output was generally            consistent with the expected effective Z, hence only a very            slight cost function weighting was applied.    -   3. Low Transmission, 1<low threshold        -   At very low transmission, it was found that higher Z            materials were occasionally mis-identified as low Z            materials. This was especially true near edges of metal            blocks, where scatter could allow an excess of low energy            X-rays to reach the detector. As a result, at low            transmission, the cost weights were designed to increase the            cost of low Z materials to produce the higher Z output more            consistently. One side effect of this approach is that very            thick organic materials start be identified as metals at low            transmission. This can only really be overcome by removing            the underlying source of the mis-identification, being an            excess of low energy X-rays in the received spectrum.

8. Effective Z Processing Implementation

The following sections outline in further detail the individualprocessing stages and algorithms. FIG. 20 indicates an overview of thevarious optional processing stages that may be implemented in thepresent method.

8.1. Tiling

The tiling algorithm is effectively a block averaging function. Thepurpose of the tiling algorithm is to average the floating effective Zimage over an area (mm²) that represents the smallest object required tobe detected of a constant intensity and material composition. The tilingalgorithm generates tiles with 50% overlap to ensure that we alwayscapture the object of interest. The tiling algorithm estimates the meanand standard deviation over rectangular tiles in the floating effectiveZ image. The tile width and height are defined by the user. Tiles areoverlapped by 50% in both vertical and horizontal dimensions. Given animage size Nr by Nc pixels, and a tile dimension Tr by Tc pixels, thenumber of tiles in the vertical dimension is floor (Nr/Tr)*2. The tiledimensions must be even valued to ensure 50% overlap. The tilingalgorithm executes a loop that indexes into each tile and calculates themean and standard deviation of all pixels in the tile.

The choice of tile dimensions essentially comes down to a compromisebetween:

-   -   1. The dimensions of the smallest object that must be detected,        and    -   2. The effective Z resolution required. The effective Z variance        has been observed to reduce almost linearly with number of        effective Z pixels averaged, so larger areas yield better        effective Z resolution.

In addition, the idea of tiling and clustering has been used to avoidthe need to implement sophisticated image segmentation at this time. Itwas felt that to get accurate effective Z measurements would in any caserequire large contiguous blocks of uniform material, so the tiling andclustering approach would be only marginally inferior to full imagesegmentation. Nonetheless, image segmentation may ultimately proveadvantageous for highly irregular shapes, especially where some moresophisticated object recognition approaches may be used in conjunctionwith effective Z measurement.

8.2. Clustering

The clustering algorithm groups tiles that have a common effective Z andare spatially connected. The purpose of clustering algorithm is todetect objects that span areas larger than the minimum object size asdefined by the tile dimensions, see section 2.1. Connectedness isdefined along edges. Connected tiles are assigned a common cluster ID.The output of the clustering algorithm is a cluster map and a clustertable. The cluster map is a matrix of connected tiles with associatedcluster IDs. The cluster table holds information on each cluster IDincluding the number of tiles in the cluster, and the vertical andhorizontal extent of each cluster.

The clustering algorithm performs row-wise scanning of the tiled image.If tile P(r,c) is connected to a tile in the set A={P(r,c−1),P(r−1,c+1), P(r−1,c), P(r−1,c−1)} then it is assigned the cluster ID. IfP(r,c) is not connected to the set A but is connected a tile in the setB={P(r,c+1), P(r+1,c−1), P(r+1,c), P(r+1,c+1)} then the tile is assigneda new cluster ID. In the case of connectedness with tiles in set A, itis possible for the P(r−1,c+1) to have a different cluster ID to othersin the set. In this case a cluster merge is performed. This is achievedby a simply replacing one cluster ID with the other, the specific orderis unimportant. The sets A and B are adapted at eight boundaryconditions, four along the image edges and four at the image vertices.

FIG. 19 depicts the formation of clusters, where single tiles areignored.

8.3. Threat Detection

The threat detection algorithm is a nearest neighbour classifier. Thealgorithm classifies individual tiles. There are two steps in thealgorithm, training and classification. The training stage establishes alookup table mapping normalized intensity to floating effective Z for arange of materials that are referred to as ‘threats’. This terminologyis of no consequence. The lookup table simply contains materials ofinterest. In the current implementation, the lookup table isapproximated as a quadratic fit, for which only the quadraticcoefficients are stored (see threat.cpp).

During the classification stage, the input is the normalized measuredtile intensity (Imeas), the measured tile floating effective Z (Zmeas),and a maximum effective Z classification error (deltaZ). For eachmaterial in the training set, the classifier declares positiveclassification if

abs(C _(i)(Imeas)−Zmeas)<deltaZ,

where C_(i) is the quadratic function associated with the i^(th) threatmaterial.

The use of both intensity and effective Z in the threat profile is animportant aspect of this approach. The effective Z is typically notconstant with material thickness, and so including the intensity(related to thickness) provides a two dimensional test with far superiordiscrimination than effective Z alone.

FIG. 15 shows the effective Z vs intensity for a range of materialsamples tested, along with the quadratic interpolation. Here thevariation of effective Z with intensity is clear.

8.4. Edge Detection

The purpose of the edge detection algorithm is to ensure that the movingaverage window in section 2.5 does not straddle material boundaries. Theedge detection uses amplitude transitions in the intensity image todeclare material edges. The input to the edge detection algorithm is theintensity image. Edges are only detected in the horizontal dimension.The reason for not detecting edges in the vertical dimension is that themoving average window only operates in the horizontal dimension. Edgesin the intensity image are computed for each detector. A first ordergradient operator is used to detect edges. The gradient operator maskwidth, and the gradient threshold, are defined by the user. Given thefollowing edge mask L(c) indexed on columns as depicted in FIG. 23, thegradient is G=sum(L(c).*Inorm(c)) where Inorm is the normalizedintensity, see section 2.6. An edge is declared when abs(G)>g where g isa user defined threshold.

8.5. Moving Average

The purpose of the moving average algorithm is to filter the intensityhistograms for each detector so as to increase the effectivesignal-to-noise ratio. The algorithm generates a filtered intensityhistogram a slice k, for each detector, by averaging the measuredintensity histograms over a symmetric window centred on slice k. Theedge detector plays an important role in ensuring the moving averagewindow does not straddle different materials. If a window overlaps anedge the average is only calculated up to the edge boundaries. The widthof the window can be set by the user. On edges, no averaging isperformed. FIG. 22 illustrates the behaviour of the moving average as ittransitions over an edge.

One embodiment that may be more computationally efficient is an adaptivemoving average approach:

-   -   1. Compute effective Z on every slice in the presence of edges.    -   2. Compute effective Z based on 50% overlapping of moving        average windows (eg every 5 pixels for 11 pixels MA length).

This can provide 3-5× improvement in computational speed depending onexact configuration.

Additional Details

1. Gamma-Ray Radiography Embodiment

Another embodiment of the invention is that of Gamma-ray radiography. Insuch an application a source of Gamma-rays (1800), such as Cobalt 60,may be used to irradiate the tunnel of a scanner (1801) with Gamma-rayphotons. The Gamma-rays source (1800) may be shielded (1802) and acollimator (1803) may also be used to create a fan beam of Gamma-rays(1804). A system of rollers (1805) or other devices such as conveyorsmay be use to pass cargo (1806), parcels, bags or other items ofinterest through the fan beam of Gamma-rays (1804). The Gamma-rayphotons will interact with the cargo (1806) via a range of interactionsincluding absorption, scattering and recoil.

Gamma-ray photons which pass through the cargo may be detected on theother side of the scanner by a detector subsystem. Such a detectorsubsystem (1807) may be an array of scintillation detectors coupled tosilicon photomultipliers to produce and electrical signal. Alternately,the array may consist of semiconductor material such as High PurityGermanium (HPGe), which is capable of direct conversion of Gamma-rayphotons into an electrical charge.

2. High Rate Pulse Processing

In principle, any suitable method of high rate pulse processing can beused within the embodiments described herein. However, the high X-Rayflux present in typical X-Ray screening systems results in a high pulsecount rate, and a high likelihood of receiving overlapping X-Ray pulses.

Pulse pile-up has long been a problem to contend within applications ofhigh rate radiation spectroscopy. Traditional approaches to pulseshaping use linear filters to shorten pulse duration which cansignificantly reduce SNR and are therefore limited to output rates of afew hundred kc/s. An alternate approach to processing the data fromradiation detectors is based on the idea of mathematically modeling datacorrupted by pulse pile-up and solving for the required modelparameters. By recovering rather than discarding data corrupted by pulsepile-up this technique enables high throughput, low dead-time pulseprocessing without the traditional loss in energy resolution.

The disclosures of international patent publications WO2006029475,WO2009121130, WO02009121131, WO2009121132, WO2010068996, WO2012171059and WO2015085372 are useful in the current invention achieving high ratepulse processing with reduction in pulse pileup rejection and are allincorporated herein by reference in their entirety as useful inembodiments of the current invention as if repeated here verbatim, andthe applicant reserves the right to incorporate any terminology andconcepts disclosed in the above international patent publications infuture claim language amendments in the current application.

The following account includes a selection from the techniques disclosedin the above international patent publications adapted to the currentinvention, but persons skilled in the art will appreciate that all ofthese techniques are potentially useful and choice among the alternativeapproaches is guided by satisfaction of various competing performanceconstraints including processing speed, energy determination accuracyand maximum count rate.

2.1. Model-Based, High-Throughput Pulse Processing—Method 1

The algorithm briefly described here, and in more detail in WO2006029475(incorporated by reference), for processing the data from radiationdetectors is a model-based, real-time, signal-processing algorithm thatcharacterizes the output of the radiation detector y[n] as shown below:

$\begin{matrix}{{{y\lbrack n\rbrack} = {{{\sum\limits_{i = 1}^{N}\; {\alpha_{i}{h\left\lbrack {n - \tau_{i}} \right\rbrack}}} + {{\omega \lbrack n\rbrack}\mspace{14mu} i}} = 1}},2,3,\ldots,N} & \left( {{Equation}\mspace{14mu} 18} \right)\end{matrix}$

The digitized radiation detector time series (y) is modeled as the sumof an unknown number of radiation events (N), with random times ofarrival (τ), and amplitudes (α), interacting with a radiation detector,that have an expected pulse shape (h) and with a noise process (ω).

Therefore, so as to fully characterize the digitized output of theradiation detector, it is desirable to estimate: the expected impulseresponse of the detector; the number of events in the digitized detectortime series; the time of arrival of each of those radiation events; andthe individual energies of each event. Once these parameters have beendetermined, the digitized detector data can be accurately decomposedinto the individual component events and the energy of each eventdetermined.

System Characterization

Calibration of the detector is the first stage of the algorithm; ittakes as input the detector time series data and determines the unitimpulse response of the detector (the expected pulse shape from thedetector). Refer to Pulse Parameter Calibration for a more detailedsummary of the pulse calibration process.

Pulse Localization

After the unit impulse response of the detector has been determined thisis used by the Pulse Localization stage to determine the number ofevents in the digitized detector data stream and their TOA relative toeach other.

The detection of events in the digitized detector waveform isaccomplished by fitting an exponential model to a fixed number of datapoints. After the System Characterization stage the exponential decay ofthe pulse tail is well characterized. The detection metric (the signalultimately used to make a decision as to whether a pulse has arrived ornot) is formed by fitting an exponential curve to a specified number ofdata points. This fixed length ‘detection window’ is run continuouslyover the digitized detector data and the sum of the squares of the erroris computed (this can also be thought of as the sum of the square of thefit residual). This operation results in three distinct modes ofoperation:

-   -   1. Baseline Operation: processing data samples when no signal is        present. As the data can be quite accurately modeled by an        exponent the sum square of the error is at a minimum and remains        quite constant.    -   2. Event Detection: when a radiation event enters the detection        window the data can no longer be accurately modeled as an        exponent (the data could be consider non-differential at T=0 the        exact arrival time of the radiation event). Consequently the sum        square of the errors will increase. This detection metric will        continue to increase until the radiation event is positioned in        the middle of the detection window.    -   3. Tail Operation: when processing data on the tail of a        radiation event the data points are quite accurately modeled as        an exponent. Consequently the sum square of the error returns to        the same level as the Baseline Operation mode.

Using such an exponent pulse fitting operation on the digitized detectorproduces an ideal detection metric. It remains low during baseline,rises rapidly in response to an event arrival and decays rapidly oncethe rising edge of the radiation event has subsided. Furthermore, byincreasing the number of ADC samples in the fixed length detectionwindow it is possible to suppress the detector noise and accuratelydetect very low energy events. However, the width of the detectionmetric (in samples) varies proportionally with the detection window.Consequently, as the detection window gets wider the ability todistinguish two closely separated pulses is diminished.

Quadratic Peak Detection

The final stage of Pulse Localization is making a decision on the exactnumber and time of arrival of each of the radiation events in thedetector data stream. One approach would be to apply a simple thresholdto the detection metric and declare a pulse arrival at the nearestsample to the threshold crossing. However, a simple threshold crossingis susceptible to noise and only provides ±0.5 sample accuracy indetermining the pulse arrival time. To have more accurate pulse arrivaltime and to be robust against noise (of particular importance whendealing with low energy signals close to the noise floor) a quadraticpeak detection algorithm can be used. Such an approach fits a quadraticto a sliding window of N samples of the detection metric (N maybe equalto 5). In order for a peak to be declared we examine the decompositionand declare a peak if the curvature is within a permitted range, theconstant is over a threshold, and the linear term has change frompositive to negative. The coefficients can also be used to determinesub-sample time of arrival.

Pulse Energy Estimation

The Pulse Energy Estimation stage determines the energy of all theradiation events in the detector data stream. As its input it uses: thea priori knowledge of the detector unit impulse response; the number ofevents; and their individual time of arrival data. The digitizeddetector data of equation 1 (y[n]) may also be written in matrix formas:

y=Ax+b  (Equation 19)

where A is an M×N matrix, the entries of which are given by

$\begin{matrix}{{A\left( {n,i} \right)} = \left\{ \begin{matrix}{h\left( {n - \tau_{i}} \right)} & {\tau_{i} \leq n < {\min \left( {m,{\tau_{i} + T - 1}} \right)}} \\0 & {{{otherwise}.}}\end{matrix} \right.} & \left( {{Equation}\mspace{14mu} 20} \right)\end{matrix}$

Thus, the columns of matrix A contain multiple versions of the unitimpulse response of the detector. For each of the individual columns thestarting point of the signal shape is defined by the signal temporalposition. For example, if the signals in the data arrive at positions 2,40, 78 and 125, column 1 of matrix A will have ‘0’ in the first row, the1^(st) data point of the unit impulse response in the second row, the2^(nd) data point of the unit impulse response in the 3^(rd) row, etc.The second column will have ‘0’ up to row 39 followed by the signalform. The third column will have ‘0’ up to row 77: the fourth columnwill have ‘0’ up to row 124 and then the signal form. Hence the size ofmatrix A is determined by the number of identified signals (whichbecomes the number of columns), while the number of rows depends on thenumber of samples in the ‘time series’.

Once the system matrix has been created it is possible to solve for thedesired energies of each radiation event using by calculating the pseudoinverse of matrix A:

x=inv(A′·A)A′·y  (Equation 21)

Data Validation

The final functional stage of the real-time, signal-processing algorithmis the Validation stage. At this stage all the parameters that have beenestimated by previous algorithmic stages (pulse shape, number of events,time of arrival and event energy) are combined to reconstruct a‘noise-free’ model of the detector data.

By subtracting this model of the detector data from the actual digitizeddetector time series, the accuracy of the estimated parameters can bedetermined. Much like examining the residual from a straight line fit ofa data set, if the magnitude of the residuals is small, the parameterswell describe the data. However, if large residuals are observed, thedetector data has been poorly estimated and that portion of the data canbe rejected.

2.2. Model-Based, High-Throughput Pulse Processing—Method 2

The algorithm briefly described here, and in more detail in WO2010068996(incorporated by reference), for processing the data from radiationdetectors is a model-based, real-time, signal-processing algorithmwherein the signal processing is at least in part conducted in atransform space.

In one embodiment, the method for resolving individual signals indetector output data comprises:

obtaining or expressing the detector output data as a digital series(such as a digital time series or a digitized spectrum);

obtaining or determining a signal form (or equivalently the impulseresponse) of signals present in the data;

forming a transformed signal form by transforming the signal formaccording to a mathematical transform;

forming a transformed series by transforming the digital seriesaccording to the mathematical transform, said transformed seriescomprising transformed signals;

evaluating a function of at least the transformed series and thetransformed signal form (and optionally of at least one parameter of thetransformed signals) and thereby providing a function output;

modelling the function output according to a model (such as by modellingthe function output as a plurality of sinusoids);

determining at least one parameter of the function output based on themodel; and

determining a parameter of the signals from the at least one determinedparameter of the function output.

It will be understood by the skilled person that individual signals indetector output data may also be described as individual pulses in adetector output or in a detector output signal (in which case signalform could be referred to as pulse form).

The signal form may generally be regarded as characterising theinteraction between the detector and the radiation (or other detectedinput) that was or is being used to collect the data. It may bedetermined or, if known from earlier measurements, calibrations or thelike, obtained from (for example) a database.

In some embodiments, transforming the digital series according to themathematical transform comprises forming a model of the digital seriesand transforming the model of the digital series according to themathematical transform.

In certain embodiments, the method includes determining a plurality ofparameters of the transformed signals, such as frequency and amplitude.

In certain particular embodiments, the transform is a Fourier transform,such as a fast fourier transform or a discrete fourier transform, or awavelet transform. Indeed, in certain embodiments the transform may beapplied somewhat differently to the signal form and digital seriesrespectively. For example, in one embodiment the mathematical transformis the Fourier transform, but the signal form is transformed with adiscrete fourier transform and the digital series is transformed with afast fourier transform.

In one embodiment, the transform is a Fourier transform and the functionis representable as

Y(k)=X(k)/H(k)  (Equation 22)

where X(k) is the transformed series and H(k) is the transformed signalform.

Thus, this method endeavors to determine a parameter of the signals andhence of as much of the data as possible, but it will be appreciatedthat it may not be possible to do so for some data (which hence istermed ‘corrupt data’), as is described below. It will be understoodthat the term ‘signal’ is interchangeable in this context with ‘pulse’,as it refers to the output corresponding to individual detection eventsrather than the overall output signal comprising the sum of individualsignals. It will also be appreciated that the temporal position (ortiming) of a signal can be measured or expressed in various ways, suchas according to the time (or position in the time axis) of the maximumof the signal or the leading edge of the signal. Typically this isdescribed as the arrival time (‘time of arrival’) or detection time.

It will also be understood that the term ‘detector data’ refers to datathat has originated from a detector, whether processed subsequently byassociated or other electronics within or outside the detector.

The signal form (or impulse response) may be determined by a calibrationprocess that involves measuring the detector's impulse response (such astime domain response or frequency domain response) to one or more singleevent detections to derive from that data the signal form or impulseresponse. A functional form of this signal form may then be obtained byinterpolating the data with (or fitting to the data) a suitable functionsuch as a polynomial, exponential or spline. A filter (such as aninverse filter) may then be constructed from this detector signal form.An initial estimate of signal parameters may be made by convolution ofthe output data from the detector with the filter. Signal parameters ofparticular interest include the number of signals and the temporalposition (or time of arrival) of each of the signals.

The particular signal parameters of interest can then be furtherrefined.

The accuracy of the parameter estimation can be determined or‘validated’ by comparing a model of the detector data stream(constructed from the signal parameters and knowledge of the detectorimpulse response) and the actual detector output. Should this validationprocess determine that some parameters are insufficiently accurate,these parameters are discarded. In spectroscopic analysis using thismethod, the energy parameters deemed sufficiently accurate may berepresented as a histogram.

The data may include signals of different forms. In this case, themethod may include determining where possible the signal form of each ofthe signals.

In one embodiment, the method includes progressively subtracting fromthe data those signals that acceptably conform to successive signalforms of a plurality of signal forms, and rejecting those signals thatdo not acceptably conform to any of the plurality of signal forms.

2.3. Model-Based, High-Throughput Pulse Processing—Method 3

The algorithm briefly described here, and in more detail inWO02012171059 (incorporated by reference), for processing the data fromradiation detectors is a model-based, real-time, signal-processingalgorithm wherein determining a location and amplitude of pulses withinthe signal is achieved by fitting a function to detector output data.

The method may further comprise detecting a pulse or pulses in saiddetector output data by:

sliding a window across the data to successive window locations;

identifying possible pulses by performing pulse fitting to the data inthe window at each window location;

determining which of the possible pulses have a pulse start fallingbefore and near the start of the respective window location and a peakamplitude exceeding the standard deviation of the noise in the window atthe respective window location; and

identifying as pulses, or outputting, those of said possible pulses thathave a pulse start falling one, two or three samples before the start ofthe respective window location and a peak amplitude exceeding thestandard deviation of the noise in the window at the respective windowlocation.

In many embodiments, the one or more functions are functions of time.

In some of those embodiments, however, the skilled person willappreciate that the one or more functions may not be functionsexclusively of time.

The method may comprise providing the detector output data in, orconverting the detector output data into, digital form before fittingthe one or more functions to the detector output data.

In one embodiment, the one or more functions are of the form:

f(t)=av(t)+be ^(−αt)  (Equation 23)

In this embodiment, v(t) may be calculated numerically, such as by theformula

v(t)=e ^(−αt)Σ_(k=0) ^(t-1) e ^(−(β-α)k)  (Equation 24)

for t=0, 1, 2 . . . (with v(0)=0).

Although mathematically,

${v(t)} = {\frac{1}{1 - e^{- {({\beta - \alpha})}}}\left( {e^{{- \alpha}\; t} - e^{{- \beta}\; t}} \right)}$

whenever β≠α, the above formula may be used to evaluate v(t)numerically. Furthermore, the above formula remains correct even whenα=β, reducing in that instance to v(t)=te^(−αt).

In one embodiment, the one or more functions are of the form:

f(t)=av(t)+be ^(−αt)  (Equation 25)

and the method includes determining a location and amplitude of thepulse with a method comprising:

defining a reference pulse p(Q) as a convolution of e^(−αt)u(t) withe^(−βt)u(t) (as further discussed in the Appendix),

determining the location τ and amplitude A of f(t) from f(t)=Ap(t−τ),with τ≦0.

The skilled person will appreciate that the present aspect of theinvention contemplates different but mathematically equivalentexpressions of this approach.

The skilled person will also appreciate that:

${{p(t)} = {\frac{1}{\beta - \alpha}\left( {e^{{- \alpha}\; t} - e^{{- \beta}\; t}} \right){u(t)}}},$

when α≠β, and

-   -   p(t)=te^(−αt), when α=β.

Expanding f(t)=Ap(t−τ) gives the two equations:

$\begin{matrix}{{\frac{1 - e^{{- {({\beta - \alpha})}}\tau}}{\beta - \alpha} = {\gamma \frac{- b}{\alpha}}},} & \left( {{Equation}\mspace{14mu} 26} \right) \\{{A = {\gamma^{- 1}e^{- {\beta\tau}}a}},} & \left( {{Equation}\mspace{14mu} 27} \right)\end{matrix}$

where

$\gamma = {\frac{1 - e^{- {({\beta - \alpha})}}}{\beta - \alpha}.}$

In the limit as β becomes equal to α, the constant γ becomes 1, andequation (1) becomes

$\tau = {\frac{- b}{a}.}$

This form is therefore suitable for use in a numerically stable methodfor a calculating τ.

If |β−α| is very small, care needs to be taken with the calculation ofγ. This may be done by summing the first few terms in the Taylorexpansion:

$\begin{matrix}{\gamma = {1 - {\frac{1}{2!}\left( {\beta - \alpha} \right)} + {\frac{1}{3!}\left( {\beta - \alpha} \right)^{2}} - {\ldots \mspace{14mu}.}}} & \left( {{Equtation}\mspace{14mu} 28} \right)\end{matrix}$

Solving equation (1) can be done numerically, such as with a bisectionmethod, especially since the left hand side is monotonic in τ.Determining the left hand side for different values of τ may be done byany suitable technique, such as with a Taylor series expansion for smallτ. (In practice, the value of τ will generally be small because noisewill generally preclude accurate characterization of a pulse thatstarted in the distant past.)

The linear approximation in τ of equation (1) is

${\tau = {\gamma \frac{- \gamma}{a}}},$

and is exact if β=α. The exact, general solution (theoretically) is

$\tau = \frac{- 1}{\beta - \alpha}$

ln

$\left( {1 + {{\gamma \left( {\beta - \alpha} \right)}\frac{b}{a}}} \right),$

the Taylor series expansion of which is:

$\begin{matrix}{{\tau = {\gamma \frac{- \gamma}{a}\left( {1 - {\frac{1}{2}x} + {\frac{1}{3}x^{2}} - {\frac{1}{4}x^{3}} + \ldots}\mspace{14mu} \right)}},{x = {{\gamma \left( {\beta - \alpha} \right)}\frac{b}{a}}}} & \left( {{Equation}\mspace{14mu} 29} \right)\end{matrix}$

which is valid provided |x|<1.

The method may comprise constraining τ by requiring that τε[τ*, 0].Thus, because the left-hand side of the equation is monotonic in r, theconstraint that τε[τ*, 0] is equivalent to the constraint on a and bthat 0≦b≦ca where the scalar c is given by

$\begin{matrix}\begin{matrix}{c = {{- \gamma^{- 1}}\frac{1 - e^{{- {({\beta - \alpha})}}\tau^{*}}}{\beta - \alpha}}} \\{= {\frac{e^{{- {({\beta - \alpha})}}\tau^{*}} - 1}{1 - e^{- {({\beta - \alpha})}}}.\left( {{Equation}\mspace{14mu} 31} \right)}}\end{matrix} & \left( {{Equation}\mspace{14mu} 30} \right)\end{matrix}$

Indeed, if τ*=−1 then

$c = \frac{e^{\beta - \alpha} - 1}{1 - e^{- {({\beta - \alpha})}}}$

Thus, it is possible to provide a constrained optimisation.This constraint can be implemented in with the constraints that α and βare not negative and α>β.

The method may also comprise constraining the amplitude of the pulse.This can be used, for example, to prevent a fitted pulse from being toosmall or too large. Indeed, referring to equation (2) above, if τ isconstrained to lie between −1 and 0 then A lies between γ⁻¹a andγ^(−a)e^(β)a. Constraining a therefore constrains the amplitude A.

According to another particular embodiment, the function f is in theform of a function with three exponentials. In a certain example of thisembodiment, the time constants τ₁, . . . , τ₃ are known and dissimilar(so fewer problems of numerical imprecision arise), and the methodincludes fitting the curve:

A ₁ e ^(−τ) ¹ ^(t) + . . . . +A ₃ e ^(−τ) ³ ^(t).  (Equation 32)

In another example of this embodiment, the time constants τ₁, . . . , τ₃are known and in ascending order such that τ₁≦τ₂≦τ₃, and fitting thefunction ƒ includes using basis vectors:

v ₁(t)=e ^(−τ) ¹ ^(t)Σ_(k=0) ^(t-1) e ^(−(τ) ² ^(−τ) ¹ ^()k)Σ_(l=0)^(k-1) e ^(−(τ) ³ ^(−τ) ² ^()l)   (Equation 33)

v ₂(t)=e ^(−τ) ¹ ^(t)Σ_(k=0) ^(t-1) e ^(−(τ) ² ^(−τ) ¹ ^()k)  (Equation34)

v ₃(t)=e ^(−τ) ¹ ^(t).  (Equation 35)

For reference, if the time-constants differ, then

${v_{1}(t)} = {{\frac{\gamma_{31} - \gamma_{21}}{\gamma_{32}}\frac{1}{\gamma_{31}\gamma_{21}}e^{{- \tau_{1}}t}} - {\frac{1}{\gamma_{32}\gamma_{21}}e^{{- \tau_{2}}t}} + {\frac{1}{\gamma_{32}\gamma_{31}}e^{{- \tau_{3}}t}}}$${{v_{2}(t)} = {\frac{1}{\gamma_{21}}\left( {e^{{- \tau_{1}}t} - e^{{- \tau_{2}}t}} \right)}},{and}$v₂(t) = e^(−τ₁t).

where γ_(ji)=1−e^(−(τ) ^(j) ^(−τ) ^(i) ⁾.

Note, however, that—unlike the previous ‘double-exponential’ case, inwhich there were two unknowns (viz. the location and the amplitude ofthe pulse) and two equations (coming from the two basis vectors), inthis ‘three-exponential’ case there are two unknowns but threeequations. There are therefore many different ways of inverting theseequations (thereby recovering the location and the amplitude of thepulse), and generally this will be the strategy that is robust to noise.

In another particular embodiment, the function ƒ is of the form:

ƒ(t)=ae ^(−αt) −be ^(−βt),  (Equation 36)

wherein α and β are scalar coefficients, and the method comprisesdetermining a and b.

This approach may not be suitable in applications in which α≅β, but insome applications it may be known that this is unlikely to occur, makingthis embodiment acceptable.

In one example of this embodiment, determining the location comprisesdetermining a location t_(a)(a,b) where:

$\begin{matrix}{{t_{*}\left( {a,b} \right)} = {\frac{{\ln \; \alpha} - {\ln \; \beta}}{\alpha - \beta} + {\frac{{\ln \; a} - {\ln \; b}}{\alpha - \beta}.}}} & \left( {{Equation}\mspace{14mu} 37} \right)\end{matrix}$

It will be appreciated that this embodiment, which uses e^(−αt) ande^(−βt) has the disadvantage that these terms converge as β approaches α(unlike the terms v(t) and e^(−αt) in the above-described embodiment,which remain distinct. Indeed, e^(−αt) might be said to correspond tothe tail of a pulse that occurred at −∞ (whereas v(t) represents a pulseoccurring at time 0).

The function ƒ may be a superposition of a plurality of functions.

The method may include determining the pulse amplitude by evaluatingƒ=ƒ(t) at t=t_(a)(a,b).

Thus, the present invention relates generally to a method and apparatusfor estimating the location and amplitude of a sum of pulses from noisyobservations of detector output data. It presented themaximum-likelihood estimate as the benchmark (which is equivalent to theminimum mean-squared error estimate since the noise is additive whiteGaussian noise).

The method may comprise low-pass filtering the data before fitting theone or more functions.

In one embodiment, however, the method comprises adapting the one ormore functions to allow for a low frequency artefact in the detectoroutput data. This may be done, in one example, by expressing the one ormore functions as a linear combination of three exponential functions(such as f(t)=ae^(−αt)−be^(−βt)++ce^(−γt)).

In a certain embodiment, the method comprises forcing any estimateshaving the pulse starting within the window to start at a boundary ofthe window.

In a particular embodiment, the method comprises maximizing window sizeor varying window size.

In one embodiment, the method comprises transforming the detector outputdata with a transform before fitting the one or more functions to thedetector output data as transformed.

This approach may be desirable in applications in which the analysis issimplified if conducted in transform space. In such situations, themethod may also comprise subsequently applying an inverse transform tothe one or more functions, though in some cases it may be possible toobtain the desired information in the transform space.

The transform may be a Laplace transform, a Fourier transform or othertransform.

In one embodiment, estimating the location of the peak comprisesminimizing an offset between the start of a window and a start of thepulse.

In a particular embodiment, the method further comprises detecting apulse or pulses in the data by:

sliding a window across the data to successive window locations;

identifying possible pulses by performing pulse fitting to the data inthe window at each window location;

determining which of the possible pulses have a pulse start fallingbefore and near the start of the respective window location and a peakamplitude exceeding the standard deviation of the noise in the window atthe respective window location; and

identifying as pulses, or outputting, those of the possible pulses thathave a pulse start falling one, two or three samples before the start ofthe respective window location and a peak amplitude exceeding thestandard deviation of the noise in the window at the respective windowlocation.

According to a second broad aspect, the invention provides a method forlocating a pulse in detector output data, comprising:

fitting a plurality of functions to the data;

determining a function of best fit, being whichever of said functionsoptimises a chosen metric when modelling said data; and

determining a location and an amplitude of a peak of said pulse fromsaid function of best fit.

In one embodiment, each of the one or more functions is a superpositionof a plurality of functions.

2.4. Model-Based, High-Throughput Pulse Processing—Method 4

The algorithm briefly described here, and in more detail in WO2015085372(incorporated by reference), for processing the data from radiationdetectors is a model-based, real-time, signal-processing algorithmwherein resolving individual signals in the detector output datacomprises transforming detector data to produce stepped data, or usingdata that is already in a stepped form, and detecting at least onesignal and estimating a parameter of the signal based at least partiallyon the stepped data.

The method comprises transforming the detector output data to producestepped data or integral data, detecting at least one event, andestimating a pulse energy associated with the event.

In some embodiments detecting the at least one event occurs by fittingan expected pulse shape with a sliding window segment of the transformedpulse shape data.

In some embodiments the method further comprises the step of detectingpeaks in the signal, wherein a detection metric is applied to thetransformed data. In some embodiments, the detection metric is comparedto a simple threshold—if the metric is less than the threshold, then nopulses are deemed present—if it exceeds the threshold, then one or morepulses may be present. Declaration of significant peaks in the detectionmetric is conducted, when the slope of the peak changing from positiveto negative indicates an event.

It will be appreciated that it may not be possible to adequatelycharacterize all data (uncharacterized data is termed ‘corrupt data’);such corrupt data may optionally be rejected. It will be understood thatthe term ‘signal’ is interchangeable in this context with ‘pulse’, as itrefers to the output corresponding to individual detection events ratherthan the overall output signal comprising the sum of individual signals.It will also be appreciated that the temporal position (or timing) of asignal can be measured or expressed in various ways, such as accordingto the time (or position in the time axis) of the maximum of the signalor the leading edge of the signal. Typically this is described as thearrival time (‘time of arrival’) or detection time.

It will also be understood that the term ‘detector data’ refers to datathat has originated from a detector, whether processed subsequently byassociated or other electronics within or outside the detector.

The method optionally comprises deleting samples within a set windowaround the rising edge to ensure the edge region of each pulse, wherethe real transformed pulse data differs from an ideally transformedpulse, is excluded from the calculations.

The method optionally comprises an assessment of variance of the energyestimations in the data, and validation of the modeled data.

The method may include building a model of the data from the processeddata output and determining the accuracy of the modeling based on acomparison between the detector output data and the model.

In one exemplary embodiment of the method 4, the method includescreating a model of the detector output using the signal parameters incombination with the detector impulse response. In another exemplaryembodiment, the method may include performing error detection bycomparing the actual detector output with the model of the detectoroutput, such as by using least squares.

The method may include discarding energy estimates deemed notsufficiently accurate. In one embodiment, the method includes presentingall sufficiently accurate energy estimates in a histogram.

3. Pulse Pileup Reduction

Even where an appropriate high rate pulse processing method is used,there will still be situations where it is not possible to distinguishbetween closely spaced pulse arrivals. Such a situation occurs whenmultiple pulses arrive within the window in which the pulse detectionalgorithm is able to determine the arrival of distinct pulses. Dependingon the ADC sampling rate, pulse arrival statistics, and detectorelectronics, the total amount of pileup may still be in the order of 5%at 1 Mc/s. Pileup can be the result of detecting 2 pulses as a singlepulse, however detecting 3 pulses as 1 pulse is also possible, whiledetecting 4 or more pulses as 1 pulse is possible but much less likely.

3.1. Problem Solution—Two Pulse Pileup Removal

If the underlying X-Ray energy spectrum is denoted x then the spectrumwith two pulse pileup is:

y=x+k ₁ x*x  (Equation 38)

where * denotes convolution, and k₁ is the pileup coefficient that isestimated from data observation or computed from theory. In order toestimate the underlying spectrum x, the following process is performed:

-   -   1. Take the FFT of each side, where convolution now becomes        multiplication, so

Y(n)=X(n)+k ₁ X(n)²  (Equation 39)

-   -   2. At each FFT bin n, solve the quadratic equation        k₁X(n)²+X(n)−Y(n)=0, bearing in mind both X(n) and Y(n) are        complex. The solution is

$\begin{matrix}{{\hat{X}(n)} = \frac{{- 1} \pm \sqrt{1 - {4\; k_{1}Y}}}{2\; k_{1}}} & \left( {{Equation}\mspace{14mu} 40} \right)\end{matrix}$

-   -   3. The correct solution to take is the “positive” solution. It        also relies on taking the correct solution to the complex square        root.    -   4. Now compute the spectrum without pileup by taking the inverse        FFT of X.

{circumflex over (x)}=IFFT({circumflex over (X)})  (Equation 41)

Using the correct pileup coefficient, it is shown that the pileup iscompletely removed.

3.2. Problem Solution—Two and Three Pulse Pileup Removal

In practice, for spectra measured on the X-ray scanning system, whenonly two pulse pileup was removed, it was observed that there was stillsome residual pileup at higher energies. This indicated there was someunremoved three (or more) pulse pileup at these higher energies. Inorder to remove some, and hopefully most, of this residual pileup, themodel is now extended to include 3 pulse pileup, so the receivedspectrum is given by:

y=x+k ₁ x*x+k ₂ x*x*x  (Equation 42)

where * denotes convolution, and k₁ and k₂ are the pileup coefficientsfor two and three pulse pileup respectively. In order to estimate theunderlying spectrum x, the following process is performed:

-   -   1. Take the FFT of each side, where convolution now becomes        multiplication, so

Y(n)=X(n)+k ₁ X(n)² +k ₂ X(n)³  (Equation 43)

-   -   2. For each of N bins in the FFT, Solve the cubic equation

k ₂ X(n)³ +k ₁ X(n)² +X(n)−Y(n)=0  (Equation 44)

-   -    bearing in mind both X and Y are complex. Like the quadratic,        there is a closed form solution, however the solution to the        cubic is considerably more complicated as follows:        -   a. Divide through by k₂ so each equation is now of the form

X(n)³ +aX(n)² +bX(n)+c(n)=0  (Equation 45)

-   -   -   noting that X(n) and c(n) are complex.        -   b. Compute

$\begin{matrix}{{Q = \frac{a^{2} - {3\; b}}{9}}{R = \frac{{2\; a^{3}} - {9\; {ab}} + {27\; c}}{54}}} & \left( {{Equation}\mspace{14mu} 46} \right)\end{matrix}$

-   -   -   c. Compute

P=√{square root over (R ² −Q ³)}  (Equation 47)

-   -   -   d. Check P, and negate if desirable. If Re(conj(R)·P)<0,            then P=−P. This is to ensure the correct cube roots are            obtained at the next step.        -   e. Compute

A=−√{square root over (R+P)}  (Equation 48)

-   -   -   f. Compute

$\begin{matrix}\begin{matrix}{B = 0} & {\; {{{if}\mspace{14mu} A} = 0}} \\{B = \frac{Q}{A}} & {otherwise}\end{matrix} & \left( {{Equation}\mspace{14mu} 49} \right)\end{matrix}$

-   -   -   g. Compute the 3 solutions to the cubic equation:

$\begin{matrix}{{r_{1} = {\left( {A + B} \right) - \frac{a}{3}}}{r_{2} = {{- \frac{A + B}{2}} - \frac{a}{3} + {i\frac{\sqrt{3}}{2}\left( {A - B} \right)}}}{r_{3} = {{- \frac{A + B}{2}} - \frac{a}{3} - {i\frac{\sqrt{3}}{2}\left( {A - B} \right)}}}} & \left( {{Equation}\mspace{14mu} 50} \right)\end{matrix}$

-   -   3. Choose the solution to allocate to X(n). The correct solution        is that with smallest magnitude of r₂ and r₃.

{circumflex over (X)}(n)=r ₂ if |r ₂ |≦|r ₃|

{circumflex over (X)}(n)=r ₃ if |r ₂ |>|r ₃|  (Equation 51)

-   -   4. Now compute the spectrum without pileup by taking the inverse        FFT of {circumflex over (X)}

{circumflex over (x)}=IFFT({circumflex over (X)})  (Equation 52)

Using the correct pileup coefficients, it is shown in FIG. 6 that thepileup is completely removed. If the same data is processed with thequadratic solver, which assumes only two pulse pileup, it can be seen inFIG. 7 there is still residual pileup in the spectrum at higher energyvalues, and slight distortion of the spectrum at lower energy.

4. Design of Optimal Spectral Smoothing Window

Smoothing of the energy spectrum is particularly useful in X-rayscreening systems where the duration for spectrum measurement may bevery short in order to achieve a high spatial resolution in the sampleimage. It has been found that typical energy spectra produced by a broadenergy X-ray scanning system tend to have almost exclusively lowfrequency components. Initially to reduce communication bandwidth, butalso to reduce computational requirement and provide the added benefitof smoothing the spectrum, the spectrum data are passed through an FFT.

After FFT, the majority of the FFT bins are discarded, as it is onlynecessary to keep approximately ⅛ of the FFT bins in order to accuratelyreconstruct the energy spectrum. For example if there are 512 histogrambins computed, only 32 complex FFT bins are retained. The last 32complex FFT bins are just the complex conjugate of these bins, and theremaining 448 bins contain (almost) no information.

The effect of discarding these FFT bins is to:

1. Provide noise rejection.

2. Filter the reconstructed spectrum (after iFFT)

However, if a rectangular FFT window is applied, after iFFT the measuredspectrum is substantially convolved with a sinc function. This is notdesirable due to the long extent of the sinc function, and largeringing.

To improve the FFT window function design, the following approach wasadopted:

-   -   1. Specify the desired “time domain” window. In this example, a        raised cosine pulse is used.    -   2. Take the FFT of the desired window (made symmetric about 0 to        give only real FFT output).    -   3. Multiply this result by the existing rectangular window only.    -   4. Further multiply the result by a window that has a slight        tapering on the edge to further reduce ringing resulting from        multiplying by a rectangular window.

FIG. 8 illustrates the result achieved. The rectangular window if usedon its own, results in the measured spectrum being convolved with a sinefunction, with width at the mid amplitude of approx 10 samples, butsignificant oscillations—around 22% at the first negative going peak. Bycareful definition of user window w it is possible to achieve a “time”domain response that is approximately raised cosine in nature, with verylittle oscillatory nature—around 0.2%. However, the width at midamplitude increases to around 20 samples.

While the FFT and data truncation were used to reduce communication andcomputational burden, the additional benefit of an appropriatelydesigned window function is that the received energy spectra aresmoothed before processing, resulting in a significant reduction innoise in the effective Z estimates, and the potential for using lessbins in the effective Z estimate while achieving a similar result.

5. Pulse Parameter Calibration

The following is a suitable method for the calibration of the receivedpulse parameters α and β for pulses of the form:

p(t)=∫_(t-T) _(a) ^(t) A[exp(−α(Σ−t ₀)−exp(−β(τ−t ₀)]dτ  (Equation 53)

where α and β are the falling edge and rising edge time constantsrespectively, t₀ is the pulse time of arrival, T_(a) is the pulseaveraging window, and A is a pulse scaling factor related to the pulseenergy.

The pulse parameters may be estimated from a time series capture of thedigitized detector signal as follows:

-   -   1. Obtain a number of samples of the digitized detector signal,        obtained during a period with X-Rays on, and overall pulse rate        is low enough that isolated pulses can be extracted. Depending        on the pulse parameters, with fast pulses it may be adequate to        use approx 500 k samples at 100 MHz sample rate, and at a count        rate of up to 500 k pulses per second.    -   2. Extract a block of samples of length (nump(        )×sampleRate/nominalCountRate). For nump( )=40, sample Rate 100        MS/s, nominal count rate 100 kcs, this is 40,000 samples.    -   3. Calculate the noise threshold nthr        -   a. Histogram the data block—the histogram bins are integers            in the range of the sampled data +/−2̂13 for 14 bit signed            data.        -   b. Find the bin with the highest value. This is the            estimated noise mean.        -   c. Find the bin where the level falls to 0.63 of the peak.            The difference from the peak is the estimated noise std            deviation (sigma)        -   d. Set the noise threshold at 2 sigma from the mean.            nthr=noiseMean+2×noiseSigma. Factors other than 2 may also            be used, depending on the application.    -   4. Calculate the signal threshold sthr        -   a. Filter the data block with the “jump” filter of the form            [−1 −1 −1 0 1 1 1]        -   b. Set the detection threshold at nthr, and increment in            steps of 4×noise Sigma.        -   c. Threshold the filtered data, and determine the number of            runs where the data exceeds sthr. A “run” is a continuous            sequence of samples that all exceed sthr, terminated on each            end by a sample below sthr.        -   d. Continue incrementing the detection threshold until at            step k nruns(k)−nruns(k−1)>=−1. That is, until the number of            runs stops decreasing. (Note: this stopping criteria might            produce a pessimistic threshold at higher count rates).        -   e. Set sthr to be the current threshold at step k.    -   5. Estimate the count rate as nruns(k)/(buffer length/sample        Rate).    -   6. Optional step: If the count rate estimate is less than half        or more than double the nominal count rate, redo the noise and        signal threshold calculation with a data buffer length computed        from the count rate estimate to get closer to nump( ) detected        pulses.    -   7. Implement the pulse detection state machine. First, detect        nump1=50 pulses to estimate the pulse length lenp (initially set        lenp to 0). Then detect nump2=600 pulses for full parameter        estimation and optimization. The pulse detection state machined        is as follows:        -   a. Enter at “seekPulse” state        -   b. When a value exceeds sthr, enter “detPulse” state        -   c. In “detPulse” state, look for value below sthr. Enter            “seekEndPulse” state        -   d. In “seek.EndPulse” state            -   i. If value>sthr, a new detection has occurred before                the end of the pulse. Enter “pulsePileUp” state            -   ii. If value<nthr and pulseLength>lenp, end of a valid                pulse is detected—record pulse start/end/length                parameters and re-enter “seek Pulse” state    -   e. In “pulsePileUp” state, look for value below sthr, then enter        “seekEndPileup” state    -   f. In “seekEndPileup”, change state        -   i. If value>sthr, a new detection has occurred before the            end of a pileup event, indicating further pileup. Return to            “pulsePileUp” state.        -   ii. If value<nthr and pulseLength>lenp, the end of the            pileup event has been reached. Record the pulse details and            mark as pileup so it is not used in calibration. In practice            all details about this pulse event could be discarded as it            will not be used in calibration.    -   8. For the first nump1 valid (isolated) pulses, do the        following:        -   a. Compute time of arrival (t0), rising edge exponent            (beta), falling edge exponent (alpha), averaging time (Ta),            maximum signal (Smax), time of maximum (tmax), pulse energy            (E).        -   b. Some pulses may be rejected at this point if it appears            there is actually more than one pulse (undetected            pileup)—this is indicated by multiple zero crossings in the            derivative of the filtered data (zero derivative=local            max/min location).        -   c. Set the pulse length estimate to 7/median(alpha). This            yields an approximate value for the sample at which the            pulse will fall to 0.001 of the peak value. A more accurate            computation can be obtained using alpha and beta if            required, but the 0.001 threshold is somewhat arbitrary in            any case, and in the tail the pulse is slowly converging to            zero.    -   9. Return to step 8 and obtain nump2 pulses. nump2=600 has been        used, but this is somewhat arbitrary and based on how many        pulses were actually in the test data Only half of these pulses        will eventually be used in the calibration, so nump2 needs to be        double the number of pulses that are required (desired) in the        calibration process.    -   10. For each of the nump2 pulses:        -   a. Compute time of arrival (t0), rising edge exponent            (beta), falling edge exponent (alpha), averaging time (Ta),            maximum signal (Smax), time of maximum (tmax), pulse energy            (E). Again, some pulses may be rejected if they appear to be            undetected pileup.        -   b. Sort the pulses into increasing energy sequence.        -   c. Compute the upper and lower quartile energy values.            Discard pulses in the upper and lower quartiles. This            effectively removes outlier energy values from the sample,            although in a mixture of pulse energies this may not be the            best thing to do. In fact it may be better to sort on alpha,            beta, or least squares cost function and discard on this            basis. For now the Energy sort seems adequate.        -   d. For the remaining pulses, now only half of nump2 (so            about 300 if nump2=600)            -   i. Compute an estimated pulse shape from the parameters                alpha, beta, Ta, t0.        -   ii. Normalize the actual received pulse by its energy.        -   iii. Compute the cost function=sum of squared errors between            the estimated and actual pulses (both are normalized to be            nominally unit energy).        -   iv. Perform an iterative least squares optimization to            obtain optimal estimates of alpha, beta, Ta, along with            final cost function and number of iterations for convergence            of the least squares optimizer. Note: An approximate Gauss            Newton LS optimizer has been implemented. Instead of full            3×3 Jacobian, a series of 1D Jacobians on each dimension are            computed. These are numerical derivatives, so could be            subject to substantial error. This means the trajectory is            not always in the optimal direction, with greater risk of            divergence if the function is not well behaved. It is not            recommended to use the function in this form, but if an            efficient LS optimizer is not available a more robust            implementation could be provided.    -   11. From the least squares optimized results, set the final        values of alpha, beta, Ta. This can be either median or mean        values of the optimized parameters. The value of to can be set        arbitrarily such that either a) t0=0 (and the pulse therefore        has some signal for sample k<0) or b) t0=ceil(Ta), in which case        the pulse is zero at k=0 and has positive value from k>=1.    -   12. The pulse form p(t) can be computed directly from the        formula and the estimated Ta, α and β.

6. Method for Baseline Tracking

In order to correctly determine the energy of the pulses, it isdesirable to account for DC offset (or signal baseline, usedinterchangeably) in the signal from the detector. This DC offset canarise from various sources including the bias levels of analogelectronics, the analog to digital conversion, and the detector itself.Control theory suggests the DC offset error may be tracked and reducedto zero by generating a feedback signal that is proportional to theintegral of the signal—however there is a significant problem in thecase of pulse processing. Pulses introduce additional features to thesignal that have non-zero mean. This introduces a bias dependent onpulse energy, count rate and pulse shape, which corrupts the feedbacksignal and prevents standard control loop tracking from successfullyremoving the DC offset.

To overcome this problem, the detector signal output is digitallyprocessed to remove the pulse shaping effects introduced by analogelectronics. When no DC offset is present, this processed signal resultsin a signal shape that has constant value in the regions between pulsearrivals, and a rapid change in value where pulses arrive. If a residualDC offset is present in the detector signal the processed signal changeslinearly with time in the regions between pulse arrivals. An errorfeedback signal that is proportional to the slope of this signal may beformed by taking the difference between two samples. These samples neednot be consecutive, but may be separated by ‘N’ samples in time. Bychoosing an appropriate value for ‘N’, a signal with a suitable signalto noise ratio may be found for driving a feedback look.

In order to reduce the impact of bias introduced by pulse events, thebaseline tracking loop is not updated when a pulse has arrived betweenthe two samples used to generate the feedback error signal.

The impact of bias may be further reduced by preventing the baselinetracking loop from updating when a pulse has arrived within a guardregion on either side of the samples used to generate the feedback errorsignal.

It should be noted that due to the biasing caused by pulse arrival, thevalue of the processed detector signal increases whenever a pulsearrives. This eventually causes the internal registers used to store thevalue of the signal to overflow. The value of the processed signal ismonitored, and when overflow is detected, the baseline tracking loop isprevented from updating until the effects of overflow have passed.

Denoting the processed pulse signal at sample n as x(n), the followingsteps summarize the procedure for computing the update to the DC offsetestimate, denoted DC(n):

-   -   1. Compute the difference between signal samples N samples apart    -   2. Determine if the update is to be applied. Do not apply the DC        update if        -   a. A pulse arrival is detected at a sample between samples n            and n+N.        -   b. Transient from a previous detected pulse has not decayed.            Transient can be considered to last M samples after a pulse            is detected.        -   c. The processed signal x(n) is about to reach positive            overflow and wrap around to a large negative value. Do not            process if x(n) is within a threshold Δ of positive or            negative overflow.    -   3. If the DC update is to be applied, then compute the DC offset        update as

DC(n)=DC(n−1)+k[x(n)−x(n−N)]  (Equation 54)

-   -    where k<<1 is the update gain, and is chosen to achieve the        desired balance between fast response and noise on the DC        estimate.

Finally, the same hardware can be used for tracking multiple baselineoffsets in multiple channels in a time division multiplexed scheme. Thevalues for the tracking loop variables for each channel arestored/loaded when switching between channels. The baseline trackingloop is prevented from updating until transient effects of the detectorchannel change has passed.

7. Collimation

Very tight collimation may be used within the scanner in order tominimise the effect of scatter on the measured spectrum. This isparticularly important where transitions from high to low or low to highintensity occur. The overall results of the system have shown thatscatter has been largely addressed through the inclusion of tightcollimation.

8. Reference Calculation

The purpose of the reference calculation is to establish the meanintensity for each detector. This value is used to scale all intensityhistograms to unit energy. This is commonly referred to asnormalization. A reference intensity is calculated for each detector.The reference intensity is calculated as the mean intensity over thefirst N slices in a scan. The intensity is the 1st bin in the FFT or thesum of all complex-valued elements in the FFT vector.

There is also a reference histogram computed in the same way—byaveraging the measured energy histograms for the first N slices. Thereference histogram is used to normalise all measured histograms toensure any run to run variations in X-ray flux do not impact theeffective Z computation.

The reference is measured during an interval where:

-   -   1. X-rays are stabilised, so X-ray flux is not varying and will        not vary for the duration of the scan (in practice the Smiths        source does vary—especially when failing—and this can impact        results)    -   2. Before the arrival of the sample under test.

The current implementation uses a duration measured in slices. This cancause problems when the slice rate is slowed below 5 ms for example—thereference collection can run into the sample under test. This needs tobe corrected in 2 ways to be fully robust:

-   -   1. Use the configured slice rate and scanning speed to compute a        duration for which the reference is collected, not a set number        of slices.    -   2. Incorporate the object detection signal to ensure reference        collection is stopped immediately if a sample is detected before        the reference duration completes—the user should be warned when        this occurs as performance would not be guaranteed.

More accurate and consistent effective Z may be obtained if a longerreference collection duration was used.

1. A device for screening one or more items of freight or baggagecomprising: a source of incident radiation configured to irradiate theone or more items; a plurality of detectors adapted to detect packets ofradiation emanating from within or passing through the one or more itemsas a result of the irradiation by the incident radiation, each detectorbeing configured to produce an electrical pulse caused by the detectedpackets having a characteristic size or shape dependent on an energy ofthe packets; one or more digital processors configured to process eachelectrical pulse to determine the characteristic size or shape and tothereby generate a detector energy spectrum for each detector of theenergies of the packets detected, and to characterize a materialassociated with the one or more items based on the detector energyspectra.
 2. The device of claim 1, wherein each packet of radiationcomprises a photon and the plurality of detectors comprise one or moredetectors each composed of a scintillation material adapted to produceelectromagnetic radiation by scintillation from the photons and a pulseproducing element adapted to produce the electrical pulse from theelectromagnetic radiation.
 3. The device of claim 2, wherein the pulseproducing element comprises a photon-sensitive material and theplurality of detectors are arranged side-by-side in one or more detectorarrays of individual scintillator elements of the scintillation materialeach covered with reflective material around sides thereof and disposedabove and optically coupled to a photon-sensitive material.
 4. Thedevice of claim 3, wherein the scintillation material compriseslutetium-yttrium oxyorthosilicate (LYSO).
 5. The device of claim 3,wherein the photon-sensitive material comprises a siliconphotomultiplier (SiPM).
 6. The device of claim 3, wherein the individualscintillator elements of one or more of the detector arrays present across-sectional area to the incident radiation of greater than 1.0square millimeter.
 7. The device of claim 6, wherein the cross-sectionalarea is greater than 2 square millimeters and less than 5 squaremillimeters.
 8. The device of claim 1, wherein the one or more digitalprocessors are further configured with a pileup recovery algorithmadapted to determine the energy associated with two or more overlappingpulses.
 9. The device of claim 1, wherein the one or more digitalprocessors is configured to compute an effective atomic number Z foreach of at least some of the detectors based at least in part on thecorresponding detector energy spectrum.
 10. The device of claim 9,wherein the one or more digital processors is configured to compute theeffective atomic number Z for each of at least some of the detectors by:determining a predicted energy spectrum for a material with effectiveatomic number Z having regard to an estimated material thickness deducedfrom the detector energy spectrum and reference mass attenuation datafor effective atomic number Z; and comparing the predicted energyspectrum with the detector energy spectrum.
 11. The device of claim 9,wherein the one or more digital processors is configured to compute theeffective atomic number Z for each of at least some of the detectors by:determining a predicted energy spectrum for a material with effectiveatomic number Z having regard to a calibration table formed by measuringone or more materials of known composition; and comparing the predictedenergy spectrum with the detector energy spectrum.
 12. The device ofclaim 10, wherein the one or more digital processors is configured toperform the step of comparing by computing a cost function dependent ona difference between the detector energy spectrum and the predictedenergy spectrum for a material with effective atomic number Z.
 13. Thedevice of claim 1, wherein a gain calibration is performed on eachdetector individually to provide consistency of energy determinationamong the detectors and the one or more digital processors is furtherconfigured to calculate the detector energy spectrum for each detectortaking into account the gain calibration.
 14. The device of claim 1,wherein a count rate dependent calibration is performed comprisingadaptation of the detector energy spectra for a count rate dependentshift.
 15. The device of claim 1, wherein a system parameter dependentcalibration is performed on the detector energy spectra comprisingadaptation for time, temperature or other system parameters.
 16. Thedevice of claim 1, wherein the one or more digital processors is furtherconfigured to reduce a communication bandwidth or memory use associatedwith processing or storage of the detector energy spectra, by performinga fast Fourier transform of the energy spectra and removing bins of thefast Fourier transform having little or no signal to produce reducedtransformed detector energy spectra.
 17. The device of claim 16, whereinthe one or more digital processors is further configured to apply aninverse fast Fourier transform on the reduced transformed detectorenergy spectra to provide reconstructed detector energy spectra.
 18. Thedevice of claim 15, wherein the one or more digital processors isfurther configured with a specific fast Fourier transform windowoptimized to minimize ringing effects of the fast Fourier transform. 19.The device of claim 1, wherein the one or more digital processors isfurther configured with a baseline offset removal algorithm to remove abaseline of a digital signal of electrical pulse prior to furtherprocessing.
 20. The device of claim 1, wherein the one or more digitalprocessors is further configured to produce an image of the one or moreitems composed of pixels representing the characterization of differentparts of the material associated with one or more items and deduced fromthe detector energy spectra.
 21. The device of claim 1, wherein the oneor more digital processors is further configured to perform one or moreof tiling, clustering, edge detection or moving average based on theeffective atomic numbers determined for said plurality of detectors. 22.The device of claim 1, wherein the one or more digital processors isfurther configured to perform threat detection based on one or moretypes or forms of target material.
 23. A method of screening one or moreitems of freight or baggage, the method comprising: irradiating the oneor more items using a source of incident radiation; detecting packets ofradiation emanating from within or passing through the one or more itemsas a result of the irradiation by the incident radiation, using aplurality of detectors, each detector being configured to produce anelectrical pulse caused by the detected packets having a characteristicsize or shape dependent on an energy of the packets; processing eachelectrical pulse using one or more digital processors to determine thecharacteristic size or shape; generating a detector energy spectrum foreach detector of the energies of the packets detected; andcharacterizing a material associated with the one or more items based onthe detector energy spectra.